> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/api-reference/stock-items.md).

# Stock Items

## List stock location items

> Lists a stock location's items.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"parameters":{"page":{"name":"page","in":"query","schema":{"type":"integer","default":1}},"per_page":{"name":"per_page","in":"query","schema":{"type":"integer","default":25}}},"schemas":{"pagination-data":{"title":"Pagination data","type":"object","properties":{"count":{"type":"integer"},"current_page":{"type":"integer"},"pages":{"type":"integer"},"per_page":{"type":"integer","description":"This will match the value passed in to the `per_page` query parameter.\n"},"total_count":{"type":"integer"}}},"stock-item":{"type":"object","properties":{"backorderable":{"type":"boolean"},"count_on_hand":{"type":"integer"},"id":{"type":"integer"},"stock_location_id":{"type":"integer"},"variant":{"$ref":"#/components/schemas/variant"},"variant_id":{"type":"integer"}},"title":"Stock item"},"variant":{"type":"object","title":"Variant","properties":{"cost_price":{"type":"string"},"depth":{"type":"string"},"description":{"type":"string"},"display_price":{"type":"string"},"height":{"type":"string"},"id":{"type":"integer"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"in_stock":{"type":"boolean"},"is_backorderable":{"type":"boolean"},"is_destroyed":{"type":"boolean"},"is_master":{"type":"boolean"},"name":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/option-value"}},"options_text":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"slug":{"type":"string"},"total_on_hand":{"type":"integer"},"track_inventory":{"type":"boolean"},"weight":{"type":"string"},"width":{"type":"string"},"metadata":{"$ref":"#/components/schemas/metadata"}}},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"option-value":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"option_type_id":{"type":"integer"},"option_type_name":{"type":"string"},"option_type_presentation":{"type":"string"},"presentation":{"type":"string"}},"title":"Option value"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"paths":{"/stock_locations/{stock_location_id}/stock_items":{"get":{"summary":"List stock location items","description":"Lists a stock location's items.","operationId":"list-stock-location-items","tags":["Stock items"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/pagination-data"},{"type":"object","properties":{"stock_items":{"type":"array","items":{"$ref":"#/components/schemas/stock-item"}}}}]}}}},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"}}}}}}
```

## Create stock location item

> Creates a stock item for a stock location.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"schemas":{"stock-item-input":{"type":"object","title":"Stock item input","properties":{"stock_item":{"type":"object","properties":{"count_on_hand":{"type":"integer"},"force":{"type":"boolean"},"active":{"type":"boolean"}}}}},"stock-item":{"type":"object","properties":{"backorderable":{"type":"boolean"},"count_on_hand":{"type":"integer"},"id":{"type":"integer"},"stock_location_id":{"type":"integer"},"variant":{"$ref":"#/components/schemas/variant"},"variant_id":{"type":"integer"}},"title":"Stock item"},"variant":{"type":"object","title":"Variant","properties":{"cost_price":{"type":"string"},"depth":{"type":"string"},"description":{"type":"string"},"display_price":{"type":"string"},"height":{"type":"string"},"id":{"type":"integer"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"in_stock":{"type":"boolean"},"is_backorderable":{"type":"boolean"},"is_destroyed":{"type":"boolean"},"is_master":{"type":"boolean"},"name":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/option-value"}},"options_text":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"slug":{"type":"string"},"total_on_hand":{"type":"integer"},"track_inventory":{"type":"boolean"},"weight":{"type":"string"},"width":{"type":"string"},"metadata":{"$ref":"#/components/schemas/metadata"}}},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"option-value":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"option_type_id":{"type":"integer"},"option_type_name":{"type":"string"},"option_type_presentation":{"type":"string"},"presentation":{"type":"string"}},"title":"Option value"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"unprocessable-entity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"errors":{"type":"object"}}}}}}}},"paths":{"/stock_locations/{stock_location_id}/stock_items":{"post":{"summary":"Create stock location item","description":"Creates a stock item for a stock location.","operationId":"create-stock-location-item","tags":["Stock items"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item-input"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item"}}}},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"},"422":{"$ref":"#/components/responses/unprocessable-entity"}}}}}}
```

## Get stock location item

> Retrieves a stock location's item.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"schemas":{"stock-item":{"type":"object","properties":{"backorderable":{"type":"boolean"},"count_on_hand":{"type":"integer"},"id":{"type":"integer"},"stock_location_id":{"type":"integer"},"variant":{"$ref":"#/components/schemas/variant"},"variant_id":{"type":"integer"}},"title":"Stock item"},"variant":{"type":"object","title":"Variant","properties":{"cost_price":{"type":"string"},"depth":{"type":"string"},"description":{"type":"string"},"display_price":{"type":"string"},"height":{"type":"string"},"id":{"type":"integer"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"in_stock":{"type":"boolean"},"is_backorderable":{"type":"boolean"},"is_destroyed":{"type":"boolean"},"is_master":{"type":"boolean"},"name":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/option-value"}},"options_text":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"slug":{"type":"string"},"total_on_hand":{"type":"integer"},"track_inventory":{"type":"boolean"},"weight":{"type":"string"},"width":{"type":"string"},"metadata":{"$ref":"#/components/schemas/metadata"}}},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"option-value":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"option_type_id":{"type":"integer"},"option_type_name":{"type":"string"},"option_type_presentation":{"type":"string"},"presentation":{"type":"string"}},"title":"Option value"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"paths":{"/stock_locations/{stock_location_id}/stock_items/{id}":{"get":{"summary":"Get stock location item","description":"Retrieves a stock location's item.","operationId":"get-stock-location-item","tags":["Stock items"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item"}}}},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"}}}}}}
```

## Delete stock location item

> Deletes a stock location's item.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"responses":{"no-content":{"description":"Successful operation with no content returned"},"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"delete-restriction":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"paths":{"/stock_locations/{stock_location_id}/stock_items/{id}":{"delete":{"summary":"Delete stock location item","description":"Deletes a stock location's item.","operationId":"delete-stock-location-item","tags":["Stock items"],"responses":{"204":{"$ref":"#/components/responses/no-content"},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"},"422":{"$ref":"#/components/responses/delete-restriction"}}}}}}
```

## Update stock location item

> Updates a stock location's item.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"schemas":{"stock-item-input":{"type":"object","title":"Stock item input","properties":{"stock_item":{"type":"object","properties":{"count_on_hand":{"type":"integer"},"force":{"type":"boolean"},"active":{"type":"boolean"}}}}},"stock-item":{"type":"object","properties":{"backorderable":{"type":"boolean"},"count_on_hand":{"type":"integer"},"id":{"type":"integer"},"stock_location_id":{"type":"integer"},"variant":{"$ref":"#/components/schemas/variant"},"variant_id":{"type":"integer"}},"title":"Stock item"},"variant":{"type":"object","title":"Variant","properties":{"cost_price":{"type":"string"},"depth":{"type":"string"},"description":{"type":"string"},"display_price":{"type":"string"},"height":{"type":"string"},"id":{"type":"integer"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"in_stock":{"type":"boolean"},"is_backorderable":{"type":"boolean"},"is_destroyed":{"type":"boolean"},"is_master":{"type":"boolean"},"name":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/option-value"}},"options_text":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"slug":{"type":"string"},"total_on_hand":{"type":"integer"},"track_inventory":{"type":"boolean"},"weight":{"type":"string"},"width":{"type":"string"},"metadata":{"$ref":"#/components/schemas/metadata"}}},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"option-value":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"option_type_id":{"type":"integer"},"option_type_name":{"type":"string"},"option_type_presentation":{"type":"string"},"presentation":{"type":"string"}},"title":"Option value"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"unprocessable-entity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"errors":{"type":"object"}}}}}}}},"paths":{"/stock_locations/{stock_location_id}/stock_items/{id}":{"patch":{"summary":"Update stock location item","description":"Updates a stock location's item.","operationId":"update-stock-location-item","tags":["Stock items"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item-input"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item"}}}},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"},"422":{"$ref":"#/components/responses/unprocessable-entity"}}}}}}
```

## Delete stock item

> Deletes a stock item.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"responses":{"no-content":{"description":"Successful operation with no content returned"},"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"delete-restriction":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"paths":{"/stock_items/{id}":{"delete":{"summary":"Delete stock item","description":"Deletes a stock item.","operationId":"delete-stock-item","tags":["Stock items"],"responses":{"204":{"$ref":"#/components/responses/no-content"},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"},"422":{"$ref":"#/components/responses/delete-restriction"}}}}}}
```

## Update stock item

> Updates a stock item.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Stock items"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"}},"schemas":{"stock-item-input":{"type":"object","title":"Stock item input","properties":{"stock_item":{"type":"object","properties":{"count_on_hand":{"type":"integer"},"force":{"type":"boolean"},"active":{"type":"boolean"}}}}},"stock-item":{"type":"object","properties":{"backorderable":{"type":"boolean"},"count_on_hand":{"type":"integer"},"id":{"type":"integer"},"stock_location_id":{"type":"integer"},"variant":{"$ref":"#/components/schemas/variant"},"variant_id":{"type":"integer"}},"title":"Stock item"},"variant":{"type":"object","title":"Variant","properties":{"cost_price":{"type":"string"},"depth":{"type":"string"},"description":{"type":"string"},"display_price":{"type":"string"},"height":{"type":"string"},"id":{"type":"integer"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"in_stock":{"type":"boolean"},"is_backorderable":{"type":"boolean"},"is_destroyed":{"type":"boolean"},"is_master":{"type":"boolean"},"name":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/option-value"}},"options_text":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"slug":{"type":"string"},"total_on_hand":{"type":"integer"},"track_inventory":{"type":"boolean"},"weight":{"type":"string"},"width":{"type":"string"},"metadata":{"$ref":"#/components/schemas/metadata"}}},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"option-value":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"option_type_id":{"type":"integer"},"option_type_name":{"type":"string"},"option_type_presentation":{"type":"string"},"presentation":{"type":"string"}},"title":"Option value"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"not-found":{"description":"Resource is not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"unprocessable-entity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"errors":{"type":"object"}}}}}}}},"paths":{"/stock_items/{id}":{"patch":{"summary":"Update stock item","description":"Updates a stock item.","operationId":"update-stock-item","tags":["Stock items"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item-input"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock-item"}}}},"401":{"$ref":"#/components/responses/invalid-api-key"},"404":{"$ref":"#/components/responses/not-found"},"422":{"$ref":"#/components/responses/unprocessable-entity"}}}}}}
```


---

# 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.chord.co/chord-oms/api-reference/stock-items.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.
