> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/widget-types/partially-update-a-widget-type.md).

# Partially update a widget type

Updates one or more fields of a widget type. Only the fields included in the request body are changed.

If `name` is provided, it must remain unique across all widget types.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Widget Types","description":"Administrative endpoints for **widget types** — the type definitions that give CMS widgets their structure. Each widget type carries a unique name and a JSON schema; the schema describes the attributes that widgets of that type can carry and is used by the management panel to render the widget's edit form.\n\n## Core Capabilities\n\n**1. Widget Type Listing & Filtering**\n* Retrieve a paginated list of widget types.\n* Filter by name (case-insensitive contains).\n\n**2. Widget Type Lifecycle Management**\n* Create a widget type with a unique name and a JSON schema.\n* Retrieve, fully or partially update, or permanently delete a widget type.\n\n## Deletion Behavior\n\nDeleting a widget type is a **hard delete** — the record is permanently removed from the database, along with all widgets that belong to that type (cascade delete via the `widget_type` foreign key on widgets). Verify that no widgets reference the type before deleting it.\n\n## Dynamic Settings & Environment Variables\n\nNo dynamic settings (`dj_dynamic_settings`) and no environment variables affect these endpoints. Listing, creation, update, and deletion behave identically regardless of management-panel configuration."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"schemas":{"WidgetTypePatchRequest":{"type":"object","description":"The body of a widget type partial update request. Only the fields included are changed.","properties":{"name":{"type":"string","maxLength":255,"description":"The unique name of the widget type."},"schema":{"type":"object","description":"The JSON schema that defines the structure of attributes for widgets of this type."}}},"WidgetType":{"type":"object","description":"A widget type record.","properties":{"pk":{"type":"integer","readOnly":true,"description":"The unique identifier of the widget type."},"name":{"type":"string","maxLength":255,"description":"The unique name of the widget type."},"schema":{"type":"object","description":"The JSON schema that defines the structure of attributes for widgets of this type.","default":{}}}},"ValidationError":{"type":"object","description":"Returned when the request contains invalid or missing data. Errors are grouped by the field they apply to: each key is the name of a field from the request and its value is a list of one or more messages describing what is wrong with that field. Messages that do not belong to any single field are grouped under `non_field_errors`.","properties":{"non_field_errors":{"type":"array","description":"Error messages that apply to the request as a whole rather than to a specific field.","items":{"type":"string"}}},"additionalProperties":{"type":"array","description":"The list of error messages for the field named by the key.","items":{"type":"string"}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"ValidationError":{"description":"The request contains invalid or missing data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WidgetTypeNotFound":{"description":"The requested widget type does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/widget_types/{id}/":{"patch":{"tags":["Widget Types"],"operationId":"partialUpdateWidgetType","summary":"Partially update a widget type","description":"Updates one or more fields of a widget type. Only the fields included in the request body are changed.\n\nIf `name` is provided, it must remain unique across all widget types.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetTypePatchRequest"}}}},"responses":{"200":{"description":"The updated widget type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetType"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/WidgetTypeNotFound"}}}}}}
```


---

# 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://apidocs.akinon.com/commerce-openapis/admin/widget-types/partially-update-a-widget-type.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.
