Search Document Model Tables

View as Markdown
Get the table types of a specific model and the standard headers of each. Use the returned `tableTypeId` and `headerId` values to address tables and cells in `POST /v2/documents/save`. `model` is the id of the model, as shown in the Staple UI or returned by `GET /v1/models`. The response covers the model's default complex table model. ##### REQUEST HEADERS | Attribute | Type | Option | Description | | --- | --- | --- | --- | | x-api-key | String | Required | An unique string | | Authorization | String | Required | The bearer token | | Content-Type | application/json | Optional | The original resource | ##### REQUEST PAYLOAD ``` { "model": Int | required | the model id } ``` ##### RESPONSE BODY | Attribute | Type | Description | | --- | --- | --- | | tableModelId | String | The model's default complex table model; `null` when the model has no complex table model at all | | tables | Array | One entry per table type | | 1\. tableTypeId | String | Table type id, accepted by `tables[].tableTypeId` in `POST /v2/documents/save` | | 2\. tableName | String | Table type name, accepted by `tables[].tableName` | | 3\. headers | Array | Standard headers of the table type: `headerId`, `headerName`, `dataType` | A model with no table types returns `200` with an empty `tables` list.

Authentication

x-api-keystring
API key issued by Staple.
AuthorizationBearer
JWT obtained from the login endpoint.

Request

This endpoint expects an object.
modelintegerOptional

Response

OK