# Production item tags

## Add Tags to a Specific Production Item

> \
> This method allows you to add tags to a specific production item (line item) in an order. Optionally, you can choose to apply the tags to nested (child) production items as well.\
> \
> \*\*Notes\*\*\
> \
> \- If all parameters are passed correctly, the system adds the specified tags to the selected production item (line item) and all its nested production items (child productions), if they exist, provided that the \`apply\_to\_nested\_productions\` parameter is set to \`true\`.\
> \- If the \`apply\_to\_nested\_productions parameter is not provided, the system adds the tags only to the main production item (line item), and the nested production items (child productions) remain unchanged.\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ManageTagsDto":{"type":"object","properties":{"tags":{"description":"A list of tags to be added to the production item","type":"array","items":{"type":"string"}},"apply_to_nested_productions":{"type":"boolean","description":"Determines if the tags should be applied to nested (child) production items. \"true\" — Tags are inherited by nested productions. \"false\" — Tags are not inherited by nested productions. Default option: \"false\" if not specified."}},"required":["tags"]},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/line-items/{line_item_id}/tags":{"post":{"description":"\nThis method allows you to add tags to a specific production item (line item) in an order. Optionally, you can choose to apply the tags to nested (child) production items as well.\n\n**Notes**\n\n- If all parameters are passed correctly, the system adds the specified tags to the selected production item (line item) and all its nested production items (child productions), if they exist, provided that the `apply_to_nested_productions` parameter is set to `true`.\n- If the `apply_to_nested_productions parameter is not provided, the system adds the tags only to the main production item (line item), and the nested production items (child productions) remain unchanged.\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_attachTagsToLineItem_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"name":"line_item_id","required":true,"in":"path","description":"The unique identifier of the production item","schema":{"type":"string"}},{"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/ManageTagsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"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 Tags to a Specific Production Item","tags":["Production item tags"]}}}}
```

## Replace tags for a specific production item

> \
> This method allows to replaces existing tags with the specified list of new tags for a specific line item (production). Optionally, it can also replace tags for all nested (child) productions if specified.\
> \
> \*\*Notes\*\*\
> \
> \- If all parameters are passed correctly, the system replaces the tags that were passed in this request for the line items (productions), which IDs were passed in the request with replacing tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If the \`apply\_to\_nested\_productions\` parameter is not provided, the system replaces the tags that were passed in this request for the line items (productions), which IDs were passed in the request without replacing tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ManageTagsDto":{"type":"object","properties":{"tags":{"description":"A list of tags to be added to the production item","type":"array","items":{"type":"string"}},"apply_to_nested_productions":{"type":"boolean","description":"Determines if the tags should be applied to nested (child) production items. \"true\" — Tags are inherited by nested productions. \"false\" — Tags are not inherited by nested productions. Default option: \"false\" if not specified."}},"required":["tags"]},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/line-items/{line_item_id}/tags":{"put":{"description":"\nThis method allows to replaces existing tags with the specified list of new tags for a specific line item (production). Optionally, it can also replace tags for all nested (child) productions if specified.\n\n**Notes**\n\n- If all parameters are passed correctly, the system replaces the tags that were passed in this request for the line items (productions), which IDs were passed in the request with replacing tags of the subitems (child productions) if the specified line items (productions) have any.\n- If the `apply_to_nested_productions` parameter is not provided, the system replaces the tags that were passed in this request for the line items (productions), which IDs were passed in the request without replacing tags of the subitems (child productions) if the specified line items (productions) have any.\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_updateTagsOfLineItem_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"name":"line_item_id","required":true,"in":"path","description":"The unique identifier of the production item","schema":{"type":"string"}},{"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/ManageTagsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"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":"Replace tags for a specific production item","tags":["Production item tags"]}}}}
```

## Delete tags for a specific production item

> \
> This method allows to delete existing tags with the specified list of new tags for a specific line item (production). Optionally, it can also delete tags for all nested (child) productions if specified.  \
> \
> \*\*Notes\*\*\
> \
> \- If all parameters are passed correctly, the system deletes the tags that were passed in this request for the line items (productions), which IDs were passed in the request with deleting tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If the \`apply\_to\_nested\_productions\` parameter is not provided, the system deletes the tags that were passed in this request for the line items (productions), which IDs were passed in the request without deleting tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/line-items/{line_item_id}/tags":{"delete":{"description":"\nThis method allows to delete existing tags with the specified list of new tags for a specific line item (production). Optionally, it can also delete tags for all nested (child) productions if specified.  \n\n**Notes**\n\n- If all parameters are passed correctly, the system deletes the tags that were passed in this request for the line items (productions), which IDs were passed in the request with deleting tags of the subitems (child productions) if the specified line items (productions) have any.\n- If the `apply_to_nested_productions` parameter is not provided, the system deletes the tags that were passed in this request for the line items (productions), which IDs were passed in the request without deleting tags of the subitems (child productions) if the specified line items (productions) have any.\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_removeTagsFromLineItem_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"name":"line_item_id","required":true,"in":"path","description":"The unique identifier of the production item","schema":{"type":"string"}},{"name":"tags","required":true,"in":"query","description":"","schema":{"type":"string"}},{"name":"apply_to_nested_productions","required":false,"in":"query","description":"","schema":{"type":"boolean"}},{"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/MessageDto"}}}},"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":"Delete tags for a specific production item","tags":["Production item tags"]}}}}
```

## Add Tags to All Productions Associated with the Order

> \
> Adds specified tags to all productions (line items) linked to a given order. Optionally, it can also add these tags to all nested (child) productions if specified.\
> \
> \*\*Notes\*\*\
> \
> \- If all parameters are passed correctly, The system adds the tags that were passed in this request to all line items (productions), connected with the order, which ID was passed in the request, with adding the subitems (child productions).\
> \- If the \`apply\_to\_nested\_productions\` parameter is not provided, the system adds the tags that were passed in this request to all line items (productions), connected with the order, which ID was passed in the request, without adding the subitems (child productions) if the line items (productions) have any.\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ManageTagsDto":{"type":"object","properties":{"tags":{"description":"A list of tags to be added to the production item","type":"array","items":{"type":"string"}},"apply_to_nested_productions":{"type":"boolean","description":"Determines if the tags should be applied to nested (child) production items. \"true\" — Tags are inherited by nested productions. \"false\" — Tags are not inherited by nested productions. Default option: \"false\" if not specified."}},"required":["tags"]},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/tags":{"post":{"description":"\nAdds specified tags to all productions (line items) linked to a given order. Optionally, it can also add these tags to all nested (child) productions if specified.\n\n**Notes**\n\n- If all parameters are passed correctly, The system adds the tags that were passed in this request to all line items (productions), connected with the order, which ID was passed in the request, with adding the subitems (child productions).\n- If the `apply_to_nested_productions` parameter is not provided, the system adds the tags that were passed in this request to all line items (productions), connected with the order, which ID was passed in the request, without adding the subitems (child productions) if the line items (productions) have any.\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_attachTagsToAllLineItems_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"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/ManageTagsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"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 Tags to All Productions Associated with the Order","tags":["Production item tags"]}}}}
```

## Replace tags for all productions associated with the order

> \
> This method allows to replaces existing tags with the specified list of new tags for all productions in this order. Optionally, it can also replace tags for all nested (child) productions if specified.  \
> \
> \*\*Notes\*\*\
> \
> \
> \- If all parameters are passed correctly, the system replaces the tags that were passed in this request for the all line items (productions), which IDs were passed in the request with replacing tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If the \`apply\_to\_nested\_productions\` parameter is not provided, the system replaces the tags that were passed in this request for the all line items (productions), which IDs were passed in the request without replacing tags of the subitems (child productions) if the specified line items (productions) have any.\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ManageTagsDto":{"type":"object","properties":{"tags":{"description":"A list of tags to be added to the production item","type":"array","items":{"type":"string"}},"apply_to_nested_productions":{"type":"boolean","description":"Determines if the tags should be applied to nested (child) production items. \"true\" — Tags are inherited by nested productions. \"false\" — Tags are not inherited by nested productions. Default option: \"false\" if not specified."}},"required":["tags"]},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/tags":{"put":{"description":"\nThis method allows to replaces existing tags with the specified list of new tags for all productions in this order. Optionally, it can also replace tags for all nested (child) productions if specified.  \n\n**Notes**\n\n\n- If all parameters are passed correctly, the system replaces the tags that were passed in this request for the all line items (productions), which IDs were passed in the request with replacing tags of the subitems (child productions) if the specified line items (productions) have any.\n- If the `apply_to_nested_productions` parameter is not provided, the system replaces the tags that were passed in this request for the all line items (productions), which IDs were passed in the request without replacing tags of the subitems (child productions) if the specified line items (productions) have any.\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_updateTagsOfAllLineItems_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"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/ManageTagsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"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":"Replace tags for all productions associated with the order","tags":["Production item tags"]}}}}
```

## Delete tags for all productions associated with the order

> \
> This method allows to delete existing tags with the specified list of new tags for all productions in this order. Optionally, it can also delete tags for all nested (child) productions if specified.\
> \
> \*\*Notes\*\*\
> \
> \- If all parameters are passed correctly, the system deletes the tags that were passed in this request for the all line items (productions), which IDs were passed in the request with deleting tags of the subitems (child productions).\
> \- If the \`apply\_to\_nested\_productions\` parameter is not provided, the system deletes the tags that were passed in this request for the all line items (productions), which IDs were passed in the request without deleting tags of the subitems (child productions).\
> \- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/orders/{external_order_id}/tags":{"delete":{"description":"\nThis method allows to delete existing tags with the specified list of new tags for all productions in this order. Optionally, it can also delete tags for all nested (child) productions if specified.\n\n**Notes**\n\n- If all parameters are passed correctly, the system deletes the tags that were passed in this request for the all line items (productions), which IDs were passed in the request with deleting tags of the subitems (child productions).\n- If the `apply_to_nested_productions` parameter is not provided, the system deletes the tags that were passed in this request for the all line items (productions), which IDs were passed in the request without deleting tags of the subitems (child productions).\n- If at least one parameter is missing or incorrect, the system returns a 400 Bad Request error, indicating incomplete or invalid data in the request.\n","operationId":"PublicProductionItemTagController_removeTagsFromAllLineItems_v1","parameters":[{"name":"external_order_id","required":true,"in":"path","description":"The unique identifier of the order","schema":{"type":"string"}},{"name":"tags","required":true,"in":"query","description":"","schema":{"type":"string"}},{"name":"apply_to_nested_productions","required":false,"in":"query","description":"","schema":{"type":"boolean"}},{"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/MessageDto"}}}},"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":"Delete tags for all productions associated with the order","tags":["Production item tags"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.hesh.app/manuals/public-api/production-item-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
