# (NEW!) Convert Metadata Table to Smart Table Stage a standard table for one-way conversion to a smart table. This endpoint does not perform the search-index remapping migration itself — that happens later, generically, when the admin applies changes in the metadata admin screen. Conversion is irreversible once it completes, which is why it's its own deliberate endpoint rather than something that could happen as a side effect of a routine field update via PATCH /metadata/tables/{id}. Business Rules: - isSingleRow tables cannot be converted. - At least one column, directly or via a cascade level, must be facetable. - Subject to the same 25-per-customer smart-table cap enforced at creation. - A table that's already smart, or already has a conversion pending, is rejected with 409. The user submitting the request must have the Metadata Template Management admin privilege. Endpoint: POST /metadata/tables/{id}/convert-to-smart Version: 1.5 Security: ApiKeyAuth, BasicAuth ## Header parameters: - `Authorization` (string, required) Provided by Authentication Token creation operation. ## Path parameters: - `id` (string, required) The unique ID of the table to convert. Example: "e6a91f4c-8b2d-4a17-9c6e-3f5a8d1b7c92" ## 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)