Skip to main content
GET
/
api
/
v1
/
templates
List Templates
curl --request GET \
  --url https://api.artosai.com/api/v1/templates/ \
  --header 'Authorization: Bearer <token>'
{
  "templates": [
    {
      "id": "<string>",
      "template_name": "<string>",
      "source_document_name": "<string>",
      "url": "<string>",
      "detected_document_type": "<string>",
      "template_id": "<string>",
      "sections": [
        {}
      ],
      "status": "<string>",
      "template_file_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Query Structure

query($filter: TemplateFilterType) {
  templates {
    all(filter: $filter) {
      edges {
        node {
          id
          name
          default
          path
          template_type {
            id
            code
            name
          }
        }
      }
    }
  }
}

Filter Argument

All filters are passed inside the filter argument. Each filter field accepts an input object with operators:
{
  "filter": {
    "name": {
      "ilike": "delivery"
    }
  }
}

Available Filters

FilterInput TypeOperatorsDescription
nameStringInputTypeeq, ilike, like, in, betweenTemplate name
template_type_codeStringInputTypeeq, ilike, like, in, betweenTemplate type code
defaultBooleanInputTypeeqFilter default templates

Filter Operators

Input TypeOperators
StringInputTypeeq (exact), ilike (case-insensitive partial), like (case-sensitive partial), in (array match), between (range)
IntegerInputTypeeq, gt, gteq, lt, lteq, between
DatetimeInputTypeeq, from, to, between
BooleanInputTypeeq (required)
IdInputTypeeq, gt, gteq, lt, lteq, in, filled
More fields and filters available via GraphQL introspection.

Authorizations

Authorization
string
header
required

Bearer token authentication. Token provides organization-scoped access.

Response

200 - application/json

Templates listed successfully

templates
object[]