# (NEW!) Update Metadata Table Update an existing table's name and/or its column list. searchField, isSingleRow, isSmartTable, and featured are permanently fixed once set and are never accepted here — featured in particular exists specifically to protect a table from deletion; if it could be toggled here, that protection would mean nothing. Business Rules: - At least one of name, tableFields is required. - name is capped at 32 characters and does not regenerate searchField. - When tableFields is provided, it fully replaces the existing columns — same effective-12-column, valid-reference, and no-duplicate-fieldId rules as create. - A new name colliding with an existing table's name/searchField is rejected with 409. The user submitting the request must have the Metadata Template Management admin privilege. Endpoint: PATCH /metadata/tables/{id} Version: 1.5 Security: ApiKeyAuth, BasicAuth ## Header parameters: - `Authorization` (string, required) Provided by Authentication Token creation operation. - `Content-Type` (string, required) Enum: "application/json" ## Path parameters: - `id` (string, required) The unique ID of the table to update. Example: "e6a91f4c-8b2d-4a17-9c6e-3f5a8d1b7c92" ## Request fields (application/json): - `name` (string) New display name for the table. Maximum 32 characters. Does not regenerate searchField. Example: "Store Locations Table (US)" - `tableFields` (array) Full replacement of the column list — not a diff. Same effective-column-count, valid-reference, and no-duplicate-fieldId rules as create. - `tableFields.fieldOrder` (integer, required) Display order. Example: 1 - `tableFields.fieldId` (string, required) Id of the existing attribute or cascade backing this column. Example: "d3f8a1c2-6b4e-4a17-9c3f-2e7b5d0a8f61" ## Response 200 fields (application/json): - `id` (string) Unique ID of the table. Example: "e6a91f4c-8b2d-4a17-9c6e-3f5a8d1b7c92" - `name` (string) Display name of the table. Example: "Store Locations Table" - `searchField` (string) System-generated slug. Permanent once created. Example: "store_locations_table" - `isSingleRow` (boolean) Fixed at creation. - `isSmartTable` (boolean) Fixed at creation. Remains false while a standard-to-smart conversion is pending (see convertTo). - `convertTo` (string,null) Set to smart while a standard-to-smart conversion is pending "Apply Changes"; null otherwise. Enum: "smart" - `featured` (boolean,null) System-assigned. null if never set. Blocks deletion when true. - `tableFields` (array) Ordered columns. Stays flat even for a cascade-backed column — no nested expansion of the cascade's own levels here. - `tableFields.fieldOrder` (integer) Display order. Example: 1 - `tableFields.fieldId` (string) Id of the attribute or cascade backing this column. Example: "d3f8a1c2-6b4e-4a17-9c3f-2e7b5d0a8f61" - `tableFields.fieldName` (string) Denormalized display name. Example: "Store Name" - `tableFields.fieldType` (string) The column's underlying type, so the UI can render the right control/icon without a second lookup. Enum: "textbox", "textarea", "date", "dropdown", "cascade" - `createdBy` (string) User-profile id of the table's creator. Example: "8f2a5c91-4e6d-4b83-9a17-6c0d3e8b2f45" - `createdEpoch` (integer) Unix timestamp (ms) of creation. Example: 1772704800000 - `createdDate` (string) ISO 8601 creation date. Example: "2026-03-05T10:00:00Z" - `lastUpdatedBy` (string) User-profile id of the last user to update the table. Example: "8f2a5c91-4e6d-4b83-9a17-6c0d3e8b2f45" - `lastUpdatedEpoch` (integer) Unix timestamp (ms) of the last update. Example: 1773325200000 - `lastUpdatedDate` (string) ISO 8601 last-updated date. Example: "2026-03-12T14:20:00Z" - `usedIn` (object) Where the table is currently referenced. Does not include an attributes category — attributes never reference a table; a table contains attributes as its columns, never the reverse. - `usedIn.metadataGroups` (array) Groups that reference this table. - `usedIn.metadataGroups.id` (string) Example: "52ce0235-02cc-46f6-8bdb-05238c76bf83" - `usedIn.metadataGroups.name` (string) Example: "Product Information" - `usedIn.metadataTemplates` (array) Templates that reference this table. ## Response 400 fields (application/json): - `status` (string) Example: "error" - `message` (string) ## Response 401 fields (application/json): - `status` (string) Example: "error" - `message` (string) ## Response 403 fields (application/json): - `status` (string) Example: "error" - `message` (string) ## Response 404 fields (application/json): - `status` (string) Example: "error" - `message` (string) ## Response 409 fields (application/json): - `status` (string) Example: "error" - `message` (string)