CREATE TABLE apiTable (
  -- 1. raw http response
  httpStatusCode INT NOT NULL,
  -- 2. request body fields
  individualIdentifier ROW<
    id STRING
  >,
  -- 3. response 200 fields
  httpcode200 ROW<
    individual ROW<
      id STRING,
      firstName STRING,
      lastName STRING,
      date_of_birth STRING,
      someBoolean BOOLEAN,
      someInteger BIGINT,
      someNumber DECIMAL
    >,
    addresses ARRAY<ROW<
      street STRING,
      housenumber DECIMAL,
      country STRING
    >>
  >,
  -- 3. response 400 fields
  httpcode400 ROW<
    `error` ROW<
      errorCode STRING,
      message STRING,
      innerErrors ARRAY<ROW<
        detailedMessage STRING
      >>
    >
  >,
  -- 3. response 404 fields
  httpcode404 ROW<
    `error` ROW<
      errorCode STRING,
      message STRING,
      innerErrors ARRAY<ROW<
        detailedMessage STRING
      >>
    >
  >,
  -- 3. response 500 fields
  httpcode500 ROW<
    `error` ROW<
      errorCode STRING,
      message STRING,
      innerErrors ARRAY<ROW<
        detailedMessage STRING
      >>
    >
  >,
  -- lookup-table-api-endpoint
  PRIMARY KEY (individualIdentifier) NOT ENFORCED
) WITH (
  -- connector options
  'connector' = 'api-endpoint-ing',
  'format' = 'json',
  'base-uri' = '${api_base_uri}',
  'host' = 'api.mycompany.com',
  'method' = 'post',
  'status-code-column' = 'httpStatusCode',
  'response-column-prefix' = 'httpcode',
  'path-template' = '/lookup',
  -- lookup-table-api-endpoint options
  'http-connect-timeout' = '5 seconds',
  'http-socket-timeout' = '10 seconds'
)