---
title: "Update a table's definition."
method: PATCH
path: "/suppliers/public/custom_tables/{tableName}"
tags: ["Custom Tables"]
---

# Update a table's definition.

`PATCH /suppliers/public/custom_tables/{tableName}`

## Request

- Base URL: `https://api.paperlessparts.com/v1`
- URL: `https://api.paperlessparts.com/v1/suppliers/public/custom_tables/{tableName}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/paperlessparts/apis/paperless-parts-api/docs/suppliers/public/custom_tables/:tableName/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a table's definition. You may rename the table, supply a new configuration, or supply new row data. Supplying new data without a new configuration will drop the existing data and populate the table with the new data (assuming the table has previously been configured) - this is not an append operation. Supplying a new configuration without new table data will apply the configuration and clear the table data. Supplying both a new configuration and new data will apply the configuration, drop the existing data, and populate the table with the new data.

## Path parameters

- `tableName` string, required: The name of the table

## Request body

- CustomTableBody
  - `name` string, nullable
  - `config` CustomTableColumnConfig[], nullable
    - `column_name` string
    - `value_type` 'numeric' | 'string' | 'boolean'
  - `data` CustomTableRowData[], nullable

## Response `200`

Successful response

- CustomTableDetails
  - `columns` string[]
  - `name` string
  - `related_entities` CustomTableRelatedEntity[]
    - `entity_type` 'operation' | 'process'
    - `name` string
  - `rows` object[]

## Other responses

- `404`: Not found response

---

[API](https://skmtc.dev/paperlessparts/apis/paperless-parts-api.md) - [All operations](https://skmtc.dev/paperlessparts/apis/paperless-parts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paperlessparts/apis/paperless-parts-api/revisions/3eb132ead1fe?raw)
