> For the complete documentation index, see [llms.txt](https://docs.hesh.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hesh.app/manuals/public-api/inventory.md).

# Inventory

## List product inventory

> \
> Returns product-inventory rows across every warehouse on the tenant, cursor-paginated.\
> \
> \### Query\
> \
> \- \`search\` (optional) — case-insensitive substring match on the product name.\
> \- \`warehouse\_id\` (optional) — restrict to a single warehouse.\
> \- \`status\` (optional) — restrict to batches in a given status (\`in\_stock\`, \`reserved\`, \`shipped\`, etc.).\
> \- \`cursor\` (optional) — opaque cursor from the previous response's \`pagination.cursor\`; omit for the first page.\
> \- \`take\` (optional) — page size; defaults to \`25\`, capped at \`100\`.\
> \
> \### Response\
> \
> Each row carries the batch's identity (\`id\`, \`inventory\_key\`), location (\`warehouse\_name\`, \`cell\_name\`, \`warehouse\_status\`, \`warehouse\_purpose\`), product identity (\`product\_name\`, \`product\_configuration\`, \`product\_variants\`, \`sku\`, \`barcode\`), quantity + status (\`number\_of\_items\`, \`product\_status\`), and provenance (\`production\_key\`, \`task\_key\`, \`number\_of\_actions\`, \`comment\`).\
> \
> Follow \`pagination.cursor\` for the next page; \`pagination.hasNextPage = false\` signals the end of the stream.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Inventory"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]},"PublicInventoryStockListPageDto":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/PublicInventoryStockPaginationDto"}},"required":["pagination"]},"PublicInventoryStockPaginationDto":{"type":"object","properties":{"hasNextPage":{"type":"boolean","description":"Whether more pages are available after this one."},"cursor":{"type":"string","nullable":true,"description":"Cursor to pass on the next request."}},"required":["hasNextPage","cursor"]}}},"paths":{"/api/v1/public/inventory/products":{"get":{"description":"\nReturns product-inventory rows across every warehouse on the tenant, cursor-paginated.\n\n### Query\n\n- `search` (optional) — case-insensitive substring match on the product name.\n- `warehouse_id` (optional) — restrict to a single warehouse.\n- `status` (optional) — restrict to batches in a given status (`in_stock`, `reserved`, `shipped`, etc.).\n- `cursor` (optional) — opaque cursor from the previous response's `pagination.cursor`; omit for the first page.\n- `take` (optional) — page size; defaults to `25`, capped at `100`.\n\n### Response\n\nEach row carries the batch's identity (`id`, `inventory_key`), location (`warehouse_name`, `cell_name`, `warehouse_status`, `warehouse_purpose`), product identity (`product_name`, `product_configuration`, `product_variants`, `sku`, `barcode`), quantity + status (`number_of_items`, `product_status`), and provenance (`production_key`, `task_key`, `number_of_actions`, `comment`).\n\nFollow `pagination.cursor` for the next page; `pagination.hasNextPage = false` signals the end of the stream.\n","operationId":"PublicInventoryController_list_v1","parameters":[{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on product name.","schema":{"maxLength":255,"type":"string"}},{"name":"warehouse_id","required":false,"in":"query","description":"Filter by warehouse UUID.","schema":{"format":"uuid","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by batch status.","schema":{"$ref":"#/components/schemas/BatchStatus"}},{"name":"cursor","required":false,"in":"query","description":"Cursor from a previous response for the next page. Omit for the first page.","schema":{"type":"string"}},{"name":"take","required":false,"in":"query","description":"Page size. Defaults to 25.","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryStockListPageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"List product inventory","tags":["Inventory"]}}}}
```

## Add product stock

> \
> Creates one receipt document and one batch per line item — a single request adds N rows to the same warehouse. Every batch gets a freshly generated \`inventory\_key\` (server-side; you don't supply it).\
> \
> \### Body\
> \
> \- \`warehouse\_id\` — destination warehouse. Required.\
> \- \`division\_id\` — destination division. Required when the warehouse's \`storage\_type\` is not \`default\`; ignored otherwise. Applied to every item in the request.\
> \- \`comment\` — attached to the receipt document.\
> \- \`products\[]\` — each item:\
> &#x20; \- \`product\_variant\_id\` — product \*\*variant\*\* id (not product id and not product-meta id). The server resolves the parent product-meta automatically.\
> &#x20; \- \`quantity\` — positive number.\
> &#x20; \- \`production\_key\` — optional. When present, the batch is linked to that workflow as its source (\`400\` if the key is unknown).\
> \
> \### Response\
> \
> Returns \`{ document\_id, data: \[...] }\` — \`document\_id\` is the receipt document that groups the batches, \`data\` mirrors each request line with the created \`id\` + generated \`inventory\_key\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Inventory"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicAddInventoryDto":{"type":"object","properties":{"warehouse_id":{"type":"string","format":"uuid","description":"Destination warehouse id."},"division_id":{"type":"string","format":"uuid","description":"Destination division id. Required for warehouses whose storage_type is not \"default\"."},"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the receipt document."},"products":{"minItems":1,"maxItems":1000,"description":"Items to add. At least one is required.","type":"array","items":{"$ref":"#/components/schemas/PublicAddInventoryItemDto"}}},"required":["warehouse_id","products"]},"PublicAddInventoryItemDto":{"type":"object","properties":{"product_variant_id":{"type":"string","format":"uuid","description":"Product variant id."},"quantity":{"type":"number","minimum":1,"description":"Quantity to receive. Must be positive."},"production_key":{"type":"string","minLength":1,"description":"Optional production workflow key. When present, the receipt is linked to that workflow as its source."}},"required":["product_variant_id","quantity"]},"PublicAddInventoryResponseDto":{"type":"object","properties":{"document_id":{"type":"string","format":"uuid","description":"Id of the receipt document that groups the created batches."},"data":{"description":"Rows created by this receipt.","type":"array","items":{"$ref":"#/components/schemas/PublicInventoryStockCreatedItemDto"}}},"required":["document_id","data"]},"PublicInventoryStockCreatedItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"inventory_key":{"type":"string","description":"Batch number applied to the created row."},"product_variant_id":{"type":"string","format":"uuid","description":"Product variant id."},"quantity":{"type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/BatchStatus"}]},"warehouse_id":{"type":"string","format":"uuid"},"division_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","inventory_key","product_variant_id","quantity","status","warehouse_id"]},"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]}}},"paths":{"/api/v1/public/inventory/products":{"post":{"description":"\nCreates one receipt document and one batch per line item — a single request adds N rows to the same warehouse. Every batch gets a freshly generated `inventory_key` (server-side; you don't supply it).\n\n### Body\n\n- `warehouse_id` — destination warehouse. Required.\n- `division_id` — destination division. Required when the warehouse's `storage_type` is not `default`; ignored otherwise. Applied to every item in the request.\n- `comment` — attached to the receipt document.\n- `products[]` — each item:\n  - `product_variant_id` — product **variant** id (not product id and not product-meta id). The server resolves the parent product-meta automatically.\n  - `quantity` — positive number.\n  - `production_key` — optional. When present, the batch is linked to that workflow as its source (`400` if the key is unknown).\n\n### Response\n\nReturns `{ document_id, data: [...] }` — `document_id` is the receipt document that groups the batches, `data` mirrors each request line with the created `id` + generated `inventory_key`.\n","operationId":"PublicInventoryController_add_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddInventoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddInventoryResponseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Add product stock","tags":["Inventory"]}}}}
```

## Get product inventory rows by inventory\_key

> \
> Returns every batch row that carries the given \`inventory\_key\` (internal \`batch\_number\`). Multiple rows can share an \`inventory\_key\` after splits — e.g. a partial transfer creates a child row in the destination warehouse but the parent row keeps the same key. The response is a flat array (no pagination), typically 1–3 entries.\
> \
> Each entry surfaces the row's \`id\`, \`inventory\_key\`, \`product\_variant\_id\`, \`quantity\`, \`status\`, \`warehouse\_id\`, \`cell\_id\` (division id), and \`production\_key\` when the batch was created from a workflow.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Inventory"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicInventoryStockByKeyDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal batch id."},"inventory_key":{"type":"string","description":"Batch number — the public \"inventory_key\"."},"product_variant_id":{"type":"string","nullable":true,"format":"uuid","description":"Product variant id."},"quantity":{"type":"number","description":"Current on-hand quantity."},"status":{"allOf":[{"$ref":"#/components/schemas/BatchStatus"}]},"warehouse_id":{"type":"string","nullable":true,"format":"uuid"},"cell_id":{"type":"string","nullable":true,"format":"uuid","description":"Warehouse division id (aliased \"cell_id\" in older docs)."},"production_key":{"type":"string","nullable":true,"description":"Source production workflow key, if the batch was produced by one."}},"required":["id","inventory_key","quantity","status"]},"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]}}},"paths":{"/api/v1/public/inventory/products/{key}":{"get":{"description":"\nReturns every batch row that carries the given `inventory_key` (internal `batch_number`). Multiple rows can share an `inventory_key` after splits — e.g. a partial transfer creates a child row in the destination warehouse but the parent row keeps the same key. The response is a flat array (no pagination), typically 1–3 entries.\n\nEach entry surfaces the row's `id`, `inventory_key`, `product_variant_id`, `quantity`, `status`, `warehouse_id`, `cell_id` (division id), and `production_key` when the batch was created from a workflow.\n","operationId":"PublicInventoryController_getByKey_v1","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicInventoryStockByKeyDto"}}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Get product inventory rows by inventory_key","tags":["Inventory"]}}}}
```

## Move product stock between warehouses

> \
> Moves stock from the batch's current location to a destination warehouse (and optionally division). Creates one change-log document per request, capturing source, destination, quantity, and comment.\
> \
> \### Behavior\
> \
> \- Partial moves (\`quantity < batch.current qty\`) split the row: the source batch keeps the remainder, a \*\*new child batch\*\* is created at the destination with the transferred quantity. The child inherits the parent's \`inventory\_key\`.\
> \- Full moves (\`quantity === batch.current qty\`) change the batch's \`warehouse\_id\` in-place — no split.\
> \- Rejected when \`quantity <= 0\` or \`quantity > batch.current qty\`.\
> \
> \
> \### \`inventory\_key\` disambiguation\
> \
> The public \`inventory\_key\` maps to the internal \`batch\_number\`. In rare cases (post-split scenarios) multiple batches can share the same \`inventory\_key\`. This endpoint requires \`inventory\_key\` to resolve to \*\*exactly one\*\* batch with status \`in\_stock\`:\
> \
> \- Zero matches → \`404\`.\
> \- Multiple matches → \`400\` with a message listing candidate batches.\
> \
> \
> \### Body\
> \
> \- \`comment\` — attached to the change-log document.\
> \- \`products\[]\` — each item: \`inventory\_key\`, \`quantity\`, destination \`warehouse\_id\`, optional \`division\_id\`.\
> \
> \### Response\
> \
> \`{ message, document\_id }\`. Follow \`document\_id\` on a future changelog endpoint to inspect the per-batch effects.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Inventory"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMoveInventoryDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the change-log document."},"products":{"minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/PublicMoveInventoryItemDto"}}},"required":["products"]},"PublicMoveInventoryItemDto":{"type":"object","properties":{"inventory_key":{"type":"string","minLength":1,"description":"Public batch number to move. Must resolve to exactly one IN_STOCK batch."},"quantity":{"type":"number","minimum":1,"description":"Quantity to move. Positive; ≤ the batch's current on-hand."},"warehouse_id":{"type":"string","format":"uuid","description":"Destination warehouse id."},"division_id":{"type":"string","format":"uuid","description":"Destination division id. Required for non-\"default\" storage types."}},"required":["inventory_key","quantity","warehouse_id"]},"PublicInventoryDocumentResultDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation message."},"document_id":{"type":"string","format":"uuid","description":"Id of the change-log document created by this operation."}},"required":["message","document_id"]}}},"paths":{"/api/v1/public/inventory/products/move":{"post":{"description":"\nMoves stock from the batch's current location to a destination warehouse (and optionally division). Creates one change-log document per request, capturing source, destination, quantity, and comment.\n\n### Behavior\n\n- Partial moves (`quantity < batch.current qty`) split the row: the source batch keeps the remainder, a **new child batch** is created at the destination with the transferred quantity. The child inherits the parent's `inventory_key`.\n- Full moves (`quantity === batch.current qty`) change the batch's `warehouse_id` in-place — no split.\n- Rejected when `quantity <= 0` or `quantity > batch.current qty`.\n\n\n### `inventory_key` disambiguation\n\nThe public `inventory_key` maps to the internal `batch_number`. In rare cases (post-split scenarios) multiple batches can share the same `inventory_key`. This endpoint requires `inventory_key` to resolve to **exactly one** batch with status `in_stock`:\n\n- Zero matches → `404`.\n- Multiple matches → `400` with a message listing candidate batches.\n\n\n### Body\n\n- `comment` — attached to the change-log document.\n- `products[]` — each item: `inventory_key`, `quantity`, destination `warehouse_id`, optional `division_id`.\n\n### Response\n\n`{ message, document_id }`. Follow `document_id` on a future changelog endpoint to inspect the per-batch effects.\n","operationId":"PublicInventoryController_move_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMoveInventoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryDocumentResultDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Move product stock between warehouses","tags":["Inventory"]}}}}
```

## Write off product stock

> \
> Writes stock off from an in-stock batch. Creates one change-log document per request.\
> \
> \### Behavior\
> \
> \- Only batches with status \`in\_stock\` can be written off. Batches already \`shipped\` / \`written\_off\` are rejected with \`400\`.\
> \- Partial write-offs (\`quantity < batch.current qty\`) split the row: the source keeps the remainder, a new child batch is created carrying the written-off quantity and moved into the \`written\_off\` state.\
> \- Full write-offs (\`quantity === batch.current qty\`) flip the batch's status in-place.\
> \- Optional \`production\_key\` attributes the write-off to a production workflow (\`400\` if the key is unknown).\
> \
> \
> \### \`inventory\_key\` disambiguation\
> \
> The public \`inventory\_key\` maps to the internal \`batch\_number\`. In rare cases (post-split scenarios) multiple batches can share the same \`inventory\_key\`. This endpoint requires \`inventory\_key\` to resolve to \*\*exactly one\*\* batch with status \`in\_stock\`:\
> \
> \- Zero matches → \`404\`.\
> \- Multiple matches → \`400\` with a message listing candidate batches.\
> \
> \
> \### Body\
> \
> \- \`comment\` — attached to the change-log document.\
> \- \`products\[]\` — each item: \`inventory\_key\`, \`quantity\`, optional \`production\_key\`.\
> \
> \### Response\
> \
> \`{ message, document\_id }\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Inventory"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicWriteOffInventoryDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the change-log document."},"products":{"minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/PublicWriteOffInventoryItemDto"}}},"required":["products"]},"PublicWriteOffInventoryItemDto":{"type":"object","properties":{"inventory_key":{"type":"string","minLength":1,"description":"Public batch number to write off. Must resolve to exactly one IN_STOCK batch."},"quantity":{"type":"number","minimum":1,"description":"Quantity to write off. Positive; ≤ the batch's current on-hand."},"production_key":{"type":"string","minLength":1,"description":"Optional production workflow key. When present, the write-off is attributed to that workflow."}},"required":["inventory_key","quantity"]},"PublicInventoryDocumentResultDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation message."},"document_id":{"type":"string","format":"uuid","description":"Id of the change-log document created by this operation."}},"required":["message","document_id"]}}},"paths":{"/api/v1/public/inventory/products/write-off":{"post":{"description":"\nWrites stock off from an in-stock batch. Creates one change-log document per request.\n\n### Behavior\n\n- Only batches with status `in_stock` can be written off. Batches already `shipped` / `written_off` are rejected with `400`.\n- Partial write-offs (`quantity < batch.current qty`) split the row: the source keeps the remainder, a new child batch is created carrying the written-off quantity and moved into the `written_off` state.\n- Full write-offs (`quantity === batch.current qty`) flip the batch's status in-place.\n- Optional `production_key` attributes the write-off to a production workflow (`400` if the key is unknown).\n\n\n### `inventory_key` disambiguation\n\nThe public `inventory_key` maps to the internal `batch_number`. In rare cases (post-split scenarios) multiple batches can share the same `inventory_key`. This endpoint requires `inventory_key` to resolve to **exactly one** batch with status `in_stock`:\n\n- Zero matches → `404`.\n- Multiple matches → `400` with a message listing candidate batches.\n\n\n### Body\n\n- `comment` — attached to the change-log document.\n- `products[]` — each item: `inventory_key`, `quantity`, optional `production_key`.\n\n### Response\n\n`{ message, document_id }`.\n","operationId":"PublicInventoryController_writeOff_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWriteOffInventoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryDocumentResultDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Write off product stock","tags":["Inventory"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hesh.app/manuals/public-api/inventory.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
