Skip to navigation

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
AttributeTypeOptionDescription
x-api-keyStringRequiredAn unique string
AuthorizationStringRequiredThe bearer token
Content-Typeapplication/jsonOptionalThe original resource
REQUEST PAYLOAD
{
"model": Int | required | the model id
}
RESPONSE BODY
AttributeTypeDescription
tableModelIdStringThe model’s default complex table model; null when the model has no complex table model at all
tablesArrayOne entry per table type
1. tableTypeIdStringTable type id, accepted by tables[].tableTypeId in POST /v2/documents/save
2. tableNameStringTable type name, accepted by tables[].tableName
3. headersArrayStandard 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