# Bankpage 2.0 — agent API guide

Use this guide to operate Bankpage from Hermes or another HTTP-capable agent. A single user message can require multiple API calls and polling. Do not treat a queued job as a finished website.

## Authentication and account scope

Base URL: https://bankpage.io/v1. For the curl commands below, set BANKPAGE_ORIGIN=https://bankpage.io (no trailing /v1) and supply BANKPAGE_API_KEY through your secret environment.
Send Authorization: Bearer bp_live_YOUR_KEY on every authenticated request. Never put keys in URLs, prompts, logs, public files or store content. JSON requests use Content-Type: application/json. API keys inherit their owner's permissions and data scope. Administrator operations require an administrator owner. A key cannot gain access to another account merely by providing an owner_id. Public storefront endpoints require no key.

Create and revoke keys in API Keys or through /api-keys. A newly created secret is returned once. There is no fixed limit on the number of keys. Expiry is optional; revocation takes effect for subsequent requests. Keep separate keys for separate agents. List endpoints are paginated; follow their documented page/pageSize or cursor/limit parameters rather than assuming the first page is complete.

Administrators can use POST /admin/users/:id/sign-in-as, then pass the returned session id in X-Bankpage-Impersonation on subsequent requests. Operations run as that target account and administrator-only endpoints are unavailable while impersonating. End the session with DELETE /account/sign-in-as/:id using the administrator key without the impersonation header. Never substitute a target user's ID for the returned session ID.

## Request and response conventions

UUIDs identify resources. Dates use ISO 8601. Monetary fields ending in Cents are integer cents; price, price_points and max_domain_price are decimal currency amounts. Basis points are hundredths of one percent. Fields with default values may be omitted. A PATCH changes provided fields; null and omission can have different meanings. Consult the input JSON Schema and validation rules for each route. Conditional business checks can reject an otherwise structurally valid request.

Success bodies vary: some return a resource directly, others {data}, {data,total}, {id}, or job progress. Do not unwrap every response identically. The response contracts below are TypeScript shapes inferred from the actual handlers, supplemented by the interface's response types. Record<string,unknown> and any mean variable resource payloads, not an empty response. Binary download endpoints return their stated file format, not JSON. Server-sent events use text/event-stream.

Public checkout accepts an optional Referer header containing the actual storefront page URL; preview origins are rejected. Store publication, active status, currency, product and gateway validation also apply server-side. Automatic HEAD counterparts of GET routes and CORS OPTIONS are transport operations; use the documented GET/write contracts for business actions.

Errors normally return {error:string,code?:string}. Handle 400 validation, 401 invalid/expired/revoked authentication, 403 permission denial, 404 missing/inaccessible resource, 409 conflict, 413 upload limits, 429 throttling and 503 temporary dependencies. Respect Retry-After. The general budget is 1,200 reads and 180 writes/minute/IP; some sensitive endpoints have lower limits. Retry idempotent reads with backoff. For purchase, Flow and document generation requests reuse the same documented request_key/requestKey/idempotencyKey after an uncertain result; do not create another purchase or generation blindly. Key creation returns a secret once; if its response is lost, revoke the orphan key and create a replacement.

## Website vocabulary and prerequisites

E-commerce = store_type classic; Nutra = nutra; Market = marketplace; marketing website = agency. A company can have multiple websites. Stores, agencies, catalog categories, product selections, brand, design rules, components, content documents, layout and domains all have API operations below. Secret integration credentials are intentionally masked on reads; write-only secrets remain write-only through the API, just as in the interface.

Resolve a company by GET /companies?search=... and inspect exact matches. If absent, POST /companies using the supplied legal/company/contact/return-facility information. Never invent missing company or director facts. GET /companies/:id returns the current profile. Follow the company schema for all editable fields. Company website readiness checks apply equally to the API and interface.

## Hermes recipe: 4 Classic, 2 Nutra, 1 Market for one company

1. GET /account to verify the intended account. Resolve or create the company as above.
2. GET /flow/preflight?dry_run=false&generate_product_images=true to check integrations and readiness. GET /flow/companies lists eligible companies. Read GET /product-categories/tree and POST /flow/availability with approved_only and price_points when choosing catalog/price settings. Classic/Nutra need 10–20 distinct price points; the market uses its own catalog strategy. Use known company data and a domain purchase budget authorized by the user. Use dry_run=true for preview-only delivery when live purchasing is not authorized.
3. POST /flow with {request_key:"NEW_UUID",config:{company_ids:["COMPANY_UUID"],counts:{classic:4,nutra:2,marketplace:1,agency:0},approved_only:true,price_points:[2.99,4.99,7.99,9.99,14.99,19.99,24.99,29.99,39.99,49.99],dry_run:false,generate_product_images:true,max_domain_price:20}}. This returns {id}. The price list and budget are examples, not authorization to spend.
4. Inspect GET /flow/:id, then POST /flow/:id/start. Poll GET /flow/:id or consume GET /flow/:id/events. GET /flow/:id/activity gives a paginated audit trail. Use retry, cancel or replan only as documented. Store item errors explain missing integrations, company data, catalog availability or domain problems.
5. For each completed item's store_id, GET /stores/:id, GET /stores/:id/publication, GET /stores/:id/domain/status and GET /stores/:id/preview-url. Publish using POST /stores/:id/publication when ready. Return the verified final URLs grouped by company; use preview URLs explicitly labeled as previews when a domain is still pending. DNS configuration, ownership verification, Render verification and TLS can complete later than store creation. Never report a pending domain as live.

For individual/manual generation use POST /stores, then the content, branding, media, pre-match, content-document draft/publish, domain provision and publication operations listed below. Store configuration and generation use the same contracts as Edit Store. GET /stores/:id exposes saved configuration; PATCH /stores/:id modifies it. POST /stores/:id/duplicate duplicates an existing website. Set active/inactive through /stores/:id/status.

## Other interface workflows

Documents: list templates, preview them, edit/reset their full HTML, create document selections, poll generation status, pause/resume/cancel, retry/regenerate, download PDFs and orders.csv, manage expense profiles and Shopify imports. Configuration CSV import/export and generation archives have dedicated API operations. Downloaded files require the Authorization header; use an HTTP client rather than an unauthenticated browser link.

Domains: check availability, purchase with an idempotency key and budget, track the receipt, assign/reassign/detach, connect external domains, get DNS instructions and verify them. Integration configuration and tests, account management (administrator only where required), leads/subscriptions, search and audit logs are also available. Clipboard copying, opening a modal, toggling a local preview and local table sorting are browser interactions: agents use the underlying data operations directly. Authentication/session sign-in is unnecessary once an API key is supplied.

## Contract reference

Every registered /v1 route is included below. JSON Schema lists accepted parameters, nesting, required fields, defaults, enums and representable constraints. The validation expression identifies additional refinements. Path placeholders must be replaced and URL-encoded. Arrays of schemas for one request part describe the validations applied by that handler, including conditional branches; consult the path's action/provider value. UI call references provide the actual interface consumers and response expectations.

The full reference can be large. Agents can retrieve a focused contract using GET /v1/public/api-guide?path=/v1/flow&method=POST or /v1/public/api-guide.md?path=/v1/stores. The path filter matches substrings; method is optional. The unfiltered Markdown includes all endpoints. Create request.json using the body schema before using a --data-binary command. Encode query parameters using your HTTP client's query argument, and replace every :path parameter. Multipart examples use an image file; Shopify uploads use CSV files. GET /flow/:id/activity.txt exports a page of activity; follow X-Next-Cursor while X-Has-More is true, including when a filter produces an empty page.

## GET /healthz

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/healthz"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ status: string; jobs: boolean; jobsMode: JobMode; }
```


## GET /v1/account

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/account" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
{ email: string; role: string; actor_id: string; impersonation_id: string | null; id: any; username: any; telegram_handle: any; }
```


## DELETE /v1/account/sign-in-as/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/account/sign-in-as/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 503

```ts
{ error: string; }
```


## GET /v1/admin/logs

Authentication: administrator. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/admin/logs" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 160
    },
    "source": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "http",
        "database",
        "worker",
        "auth",
        "storage"
      ]
    },
    "level": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "info",
        "warning",
        "error"
      ]
    },
    "actor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "to": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "before": {
      "type": "string",
      "pattern": "^\\d+$"
    }
  }
}
```

Input type:

```ts
{ search?: string | undefined; source?: "all" | "http" | "database" | "worker" | "auth" | "storage" | undefined; level?: "all" | "info" | "warning" | "error" | undefined; actor?: string | undefined; from?: string | undefined; to?: string | undefined; before?: string | undefined; }
```

Validation: filters


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: any[]; next: string | null; }
```


## GET /v1/admin/users

Authentication: administrator. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/admin/users" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 100
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  }
}
```

Input type:

```ts
{ search?: string | undefined; page?: unknown; }
```

Validation: z
      .object({
        search: z.string().trim().max(100).default(''),
        page: z.coerce.number().int().min(1).default(1),
      })


### Expected responses

HTTP 200

```ts
{data: {id:string; username:string; email:string; telegram_handle:string|null; role:"admin"|"user"; created_at:string; email_confirmed_at:string|null}[]; total:number}
```


## PATCH /v1/admin/users/:id/role

Authentication: administrator. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/admin/users/:id/role" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "admin",
        "user"
      ]
    }
  },
  "required": [
    "role"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ role: "admin" | "user"; }
```

Validation: z.strictObject({ role: z.enum(['admin', 'user']) })


### Expected responses

HTTP 409

```ts
{ error: string; }
```

HTTP 200

```ts
{ role: "admin" | "user"; }
```


## POST /v1/admin/users/:id/sign-in-as

Authentication: administrator. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/admin/users/:id/sign-in-as" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
{ target_id: string; email: string; id: any; expires_at: any; }
```


## GET /v1/api-keys

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/api-keys" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "page_size": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  }
}
```

Input type:

```ts
{ page?: unknown; page_size?: unknown; }
```

Validation: z
      .object({
        page: z.coerce.number().int().min(1).default(1),
        page_size: z.coerce.number().int().min(1).max(100).default(50),
      })


### Expected responses

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: ApiKeyMetadata[]; total: number; page: number; page_size: number; }
```


## POST /v1/api-keys

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/api-keys" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ name: string; expires_at?: string | null | undefined; }
```

Validation: createApiKeySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 201

```ts
{ data: ApiKeyMetadata; key: string; }
```


## DELETE /v1/api-keys/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/api-keys/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 503

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: { id: string; revoked: boolean; }; }
```


## PATCH /v1/api-keys/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/api-keys/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ name: string; }
```

Validation: z.strictObject({ name: z.string().trim().min(1).max(100) })


### Expected responses

HTTP 503

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: ApiKeyMetadata; }
```


## GET /v1/companies

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/companies" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    },
    "company_ids": {
      "description": "Stores only: comma-separated company UUIDs (up to 100). Any selected company matches; combined with all other filters.",
      "type": "string"
    },
    "store_types": {
      "description": "Stores only: comma-separated classic, nutra, marketplace or agency types. Any selected type matches, within site_kind.",
      "type": "string"
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ],
      "description": "Stores only: filter domain connection status."
    },
    "publication_status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "Stores only: ready means publish_ready=true; not_ready means generation still needs completion. Independent of enabled status and domain connectivity."
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "active",
        "inactive"
      ]
    },
    "categoryId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    },
    "approved": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; company_ids?: string | undefined; store_types?: string | undefined; domain_status?: "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | undefined; publication_status?: "ready" | "not_ready" | undefined; page?: unknown; pageSize?: unknown; sort?: string | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "active" | "inactive" | undefined; categoryId?: string | undefined; scope?: "all" | "shared" | "custom" | undefined; approved?: "all" | "true" | "false" | undefined; }
```

Validation: listQuerySchema


### Expected responses

HTTP 200

```ts
{data: companies[], total: number} — see resource models; store lists include related summaries
```


## POST /v1/companies

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/companies" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "default": "active",
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "company_type": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_date": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "director_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "support_hours": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "customer_support_terms": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ]
    },
    "commerce_policy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "product_purchase_options": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "variations": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "name",
                        "options"
                      ]
                    }
                  },
                  "size_confirmation_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variations"
                ]
              }
            },
            "shipping_carrier": {
              "type": "string",
              "minLength": 2,
              "maxLength": 60
            },
            "processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "shipping_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "shipping_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "refund_processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_return_facility_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "ein": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ]
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 201

```ts
companies — see resource models; company/director secret identifiers are masked; related records may be included
```


## DELETE /v1/companies/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/companies/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/companies/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/companies/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
companies — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/companies/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/companies/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "company_type": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_date": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "director_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "support_hours": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "customer_support_terms": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ]
    },
    "commerce_policy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "product_purchase_options": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "variations": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "name",
                        "options"
                      ]
                    }
                  },
                  "size_confirmation_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variations"
                ]
              }
            },
            "shipping_carrier": {
              "type": "string",
              "minLength": 2,
              "maxLength": 60
            },
            "processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "shipping_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "shipping_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "refund_processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_return_facility_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "ein": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 200

```ts
companies — see resource models; company/director secret identifiers are masked; related records may be included
```


## PUT /v1/companies/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/companies/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "company_type": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_date": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "incorporation_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "director_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "support_hours": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "customer_support_terms": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ]
    },
    "commerce_policy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "product_purchase_options": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "variations": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "name",
                        "options"
                      ]
                    }
                  },
                  "size_confirmation_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variations"
                ]
              }
            },
            "shipping_carrier": {
              "type": "string",
              "minLength": 2,
              "maxLength": 60
            },
            "processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "shipping_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "shipping_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "refund_processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_return_facility_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "fulfillment_country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "ein": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 200

```ts
companies — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/companies/:id/status

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/companies/:id/status" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

Input type:

```ts
{ status: "active" | "inactive"; }
```

Validation: statusUpdateSchema


### Expected responses

HTTP 200

```ts
companies
```


## GET /v1/config

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/config" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ namecheapDryRun: boolean; namecheapConfigured: boolean; unsplashMissing: boolean; jobsEnabled: boolean; jobsMode: JobMode; }
```


## GET /v1/css-engine

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/css-engine" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ data: any; control: { paused: any; reason: any; updated_at: any; } | { paused: boolean; reason: null; }; }
```


## GET /v1/directors

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/directors" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    },
    "company_ids": {
      "description": "Stores only: comma-separated company UUIDs (up to 100). Any selected company matches; combined with all other filters.",
      "type": "string"
    },
    "store_types": {
      "description": "Stores only: comma-separated classic, nutra, marketplace or agency types. Any selected type matches, within site_kind.",
      "type": "string"
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ],
      "description": "Stores only: filter domain connection status."
    },
    "publication_status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "Stores only: ready means publish_ready=true; not_ready means generation still needs completion. Independent of enabled status and domain connectivity."
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "active",
        "inactive"
      ]
    },
    "categoryId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    },
    "approved": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; company_ids?: string | undefined; store_types?: string | undefined; domain_status?: "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | undefined; publication_status?: "ready" | "not_ready" | undefined; page?: unknown; pageSize?: unknown; sort?: string | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "active" | "inactive" | undefined; categoryId?: string | undefined; scope?: "all" | "shared" | "custom" | undefined; approved?: "all" | "true" | "false" | undefined; }
```

Validation: listQuerySchema


### Expected responses

HTTP 200

```ts
{data: directors[], total: number} — see resource models; store lists include related summaries
```


## POST /v1/directors

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/directors" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "default": "active",
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssn": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "name_review_required": {
      "type": "boolean",
      "const": false
    }
  },
  "required": [
    "first_name",
    "last_name"
  ]
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 201

```ts
directors — see resource models; company/director secret identifiers are masked; related records may be included
```


## DELETE /v1/directors/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/directors/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/directors/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/directors/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
directors — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/directors/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/directors/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssn": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "name_review_required": {
      "type": "boolean",
      "const": false
    }
  }
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 200

```ts
directors — see resource models; company/director secret identifiers are masked; related records may be included
```


## PUT /v1/directors/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/directors/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "address_line1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "personal_phone": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{7,14}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssn": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_account_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "bank_routing_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "name_review_required": {
      "type": "boolean",
      "const": false
    }
  }
}
```

Input type:

```ts
{ name: string; status?: "active" | "inactive" | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; } | { name?: string | undefined; company_type?: string | null | undefined; incorporation_date?: string | null | undefined; incorporation_state?: string | null | undefined; director_id?: string | null | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; phone?: string | null | undefined; email?: string | null | undefined; support_hours?: string | null | undefined; customer_support_terms?: string | null | undefined; commerce_policy?: { product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; } | null | undefined; fulfillment_return_facility_name?: string | null | undefined; fulfillment_address_line1?: string | null | undefined; fulfillment_address_line2?: string | null | undefined; fulfillment_city?: string | null | undefined; fulfillment_state?: string | null | undefined; fulfillment_postal_code?: string | null | undefined; fulfillment_country?: string | null | undefined; ein?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; status?: "active" | "inactive" | undefined; } | { first_name: string; last_name: string; status?: "active" | "inactive" | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; } | { first_name?: string | undefined; last_name?: string | undefined; address_line1?: string | null | undefined; address_line2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postal_code?: string | null | undefined; country?: string | null | undefined; personal_email?: string | null | undefined; personal_phone?: string | null | undefined; company_id?: string | null | undefined; ssn?: string | null | undefined; bank_account_number?: string | null | undefined; bank_routing_number?: string | null | undefined; name_review_required?: false | undefined; status?: "active" | "inactive" | undefined; }
```

Validation: (create ? config.create : config.update)


### Expected responses

HTTP 200

```ts
directors — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/directors/:id/status

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/directors/:id/status" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

Input type:

```ts
{ status: "active" | "inactive"; }
```

Validation: statusUpdateSchema


### Expected responses

HTTP 200

```ts
directors
```


## POST /v1/document-configurations/export

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 6291456 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/document-configurations/export" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "companyIds": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "documents": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "business-bank-statement",
              "business-bank-letter",
              "business-bank-statement-initial-deposit",
              "personal-bank-statement",
              "phone-bill",
              "utility-bill",
              "agreements",
              "processing-statement",
              "gmp-certificate",
              "supplier-invoice",
              "tax-return",
              "tax-return-confirmation"
            ]
          },
          "templateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1",
              "business-bank-letter-v1",
              "personal-bank-statement-v1",
              "phone-bill-v1",
              "utility-bill-v1",
              "agreements-v1",
              "processing-statement-v1",
              "gmp-certificate-v1",
              "supplier-invoice-v1",
              "business-bank-statement-initial-deposit-v1",
              "business-bank-statement-v1",
              "business-bank-statement-cash-v2"
            ]
          },
          "expenseProfileId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "monthCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "bankStatement": {
            "type": "object",
            "properties": {
              "balanceMode": {
                "type": "string",
                "enum": [
                  "expense-ratio",
                  "exact-balances"
                ]
              },
              "openingBalanceCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000000
              },
              "closingBalanceCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000000
              },
              "dailyCreditPolicy": {
                "default": "business_days",
                "type": "string",
                "enum": [
                  "business_days",
                  "every_day",
                  "profile_frequency"
                ]
              },
              "totalCreditsCents": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100000000000
              },
              "expenseAllocation": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "minPercent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100,
                      "multipleOf": 0.01
                    },
                    "maxPercent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100,
                      "multipleOf": 0.01
                    },
                    "percent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "category",
                    "percent"
                  ],
                  "additionalProperties": false
                }
              },
              "expenseRatio": {
                "type": "object",
                "properties": {
                  "minBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "maxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "minBps",
                  "maxBps"
                ],
                "additionalProperties": false
              },
              "payoutTiming": {
                "type": "object",
                "properties": {
                  "settlementDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  },
                  "bankTransferDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 5
                  },
                  "variationPercent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 80
                  },
                  "spikeProbabilityPercent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  }
                },
                "required": [
                  "settlementDays",
                  "bankTransferDays",
                  "variationPercent",
                  "spikeProbabilityPercent"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "openingBalanceCents",
              "closingBalanceCents"
            ],
            "additionalProperties": false
          },
          "processing": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "feeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "reserveBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "refundRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "chargebackRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "aovCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000000
                  }
                },
                "required": [
                  "feeBps",
                  "reserveBps",
                  "refundRateBps",
                  "chargebackRateBps",
                  "aovCents"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "feeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "reserveBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "refundRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "chargebackRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "aovCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000000
                  },
                  "advanced": {
                    "type": "object",
                    "properties": {
                      "paymentMix": {
                        "default": [
                          {
                            "brand": "visa",
                            "shareBps": 6000
                          },
                          {
                            "brand": "mastercard",
                            "shareBps": 3000
                          },
                          {
                            "brand": "amex",
                            "shareBps": 700
                          },
                          {
                            "brand": "discover",
                            "shareBps": 300
                          }
                        ],
                        "minItems": 1,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "brand": {
                              "type": "string",
                              "enum": [
                                "visa",
                                "mastercard",
                                "amex",
                                "discover",
                                "other"
                              ]
                            },
                            "shareBps": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10000
                            }
                          },
                          "required": [
                            "brand",
                            "shareBps"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "fees": {
                        "default": [],
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "category": {
                              "type": "string",
                              "enum": [
                                "processing",
                                "authorization",
                                "interchange",
                                "network",
                                "dispute",
                                "account",
                                "other"
                              ]
                            },
                            "basis": {
                              "type": "string",
                              "enum": [
                                "gross_sales",
                                "net_sales",
                                "sales_and_refunds",
                                "sales",
                                "refunds",
                                "disputes",
                                "authorizations",
                                "avs",
                                "declines",
                                "batches",
                                "payouts",
                                "month"
                              ]
                            },
                            "brand": {
                              "type": "string",
                              "enum": [
                                "visa",
                                "mastercard",
                                "amex",
                                "discover",
                                "other"
                              ]
                            },
                            "shareBps": {
                              "default": 10000,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "percent": {
                              "default": "0",
                              "type": "string",
                              "pattern": "^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,9})?$"
                            },
                            "unitUsd": {
                              "default": "0",
                              "type": "string",
                              "pattern": "^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,9})?$"
                            },
                            "flatCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "minimumCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "direction": {
                              "default": "charge",
                              "type": "string",
                              "enum": [
                                "charge",
                                "credit"
                              ]
                            },
                            "collection": {
                              "default": "withheld",
                              "type": "string",
                              "enum": [
                                "withheld",
                                "invoiced"
                              ]
                            },
                            "prepaidCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "months": {
                              "default": [],
                              "maxItems": 12,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 12
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "category",
                            "basis"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "activity": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "salesCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "reversalVersion": {
                            "type": "number",
                            "const": 2
                          },
                          "aovRangeCents": {
                            "type": "object",
                            "properties": {
                              "minCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "maxCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              }
                            },
                            "required": [
                              "minCents",
                              "maxCents"
                            ],
                            "additionalProperties": false
                          },
                          "refundRateRangeBps": {
                            "type": "object",
                            "properties": {
                              "minBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              },
                              "maxBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              }
                            },
                            "required": [
                              "minBps",
                              "maxBps"
                            ],
                            "additionalProperties": false
                          },
                          "chargebackRateRangeBps": {
                            "type": "object",
                            "properties": {
                              "minBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              },
                              "maxBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              }
                            },
                            "required": [
                              "minBps",
                              "maxBps"
                            ],
                            "additionalProperties": false
                          },
                          "saleAmountRange": {
                            "type": "object",
                            "properties": {
                              "minCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "maxCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "distributionVersion": {
                                "type": "number",
                                "const": 2
                              }
                            },
                            "required": [
                              "minCents",
                              "maxCents"
                            ],
                            "additionalProperties": false
                          },
                          "authorizationMultiplierBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "avsCoverageBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "declineRateBps": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "refundAmountBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "chargebackAmountBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "priorRefunds": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "priorChargebacks": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "recoveries": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "adjustments": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 180
                                }
                              },
                              "required": [
                                "date",
                                "amountCents",
                                "description"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "reserve": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "openingCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "basis": {
                            "default": "gross_sales",
                            "type": "string",
                            "enum": [
                              "gross_sales",
                              "net_sales"
                            ]
                          },
                          "capCents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "releases": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "balances": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "openingAvailableCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "openingPending": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "availableOn": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "availableOn",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "openingHeldCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "closingAvailableCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "holds": {
                        "default": [],
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "action": {
                              "type": "string",
                              "enum": [
                                "hold",
                                "release"
                              ]
                            },
                            "amountCents": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "date",
                            "action",
                            "amountCents"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "settlement": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "lagBusinessDays": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "minimumPayoutCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "continuousActivity": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      "priorYearToDate": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "year": {
                            "default": 2026,
                            "type": "integer",
                            "minimum": 1900,
                            "maximum": 9999
                          },
                          "grossSalesCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "salesCount": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "feeBps",
                  "reserveBps",
                  "refundRateBps",
                  "chargebackRateBps",
                  "aovCents",
                  "advanced"
                ],
                "additionalProperties": false
              }
            ]
          },
          "processingTemplateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1",
              "business-bank-letter-v1",
              "personal-bank-statement-v1",
              "phone-bill-v1",
              "utility-bill-v1",
              "agreements-v1",
              "processing-statement-v1",
              "gmp-certificate-v1",
              "supplier-invoice-v1",
              "business-bank-statement-initial-deposit-v1",
              "business-bank-statement-v1",
              "business-bank-statement-cash-v2"
            ]
          },
          "confirmationTemplateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1",
              "business-bank-letter-v1",
              "personal-bank-statement-v1",
              "phone-bill-v1",
              "utility-bill-v1",
              "agreements-v1",
              "processing-statement-v1",
              "gmp-certificate-v1",
              "supplier-invoice-v1",
              "business-bank-statement-initial-deposit-v1",
              "business-bank-statement-v1",
              "business-bank-statement-cash-v2"
            ]
          },
          "includeConfirmation": {
            "type": "boolean"
          },
          "processingDocumentFields": {
            "type": "object",
            "properties": {
              "merchantNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "associationNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "officeNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "processorAccountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "controlReference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "mailingReference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "dbaName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "locationAddress": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "recipientName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 250
              },
              "disputeWithdrawalRangeBps": {
                "type": "object",
                "properties": {
                  "minBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "maxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "minBps",
                  "maxBps"
                ],
                "additionalProperties": false
              },
              "disputeWithdrawalBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              },
              "thirdPartyAdjustmentIndexes": {
                "maxItems": 1000,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 999
                }
              }
            },
            "additionalProperties": false
          },
          "initialDeposit": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "amountCents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000000000
              }
            },
            "required": [
              "date",
              "amountCents"
            ],
            "additionalProperties": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "expense-engine",
              "initial-deposit"
            ]
          },
          "documentOptions": {
            "type": "object",
            "properties": {
              "bank": {
                "type": "object",
                "properties": {
                  "statementTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "priorYtd": {
                    "type": "object",
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "feesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      },
                      "interestAndBonusesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      },
                      "overdraftFeesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      }
                    },
                    "required": [
                      "year"
                    ],
                    "additionalProperties": false
                  },
                  "letterSignatoryName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "letterSignatoryTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "statementReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "mailingReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "transactionReferences": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "transactionIndex": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "reference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "checkNumber": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        }
                      },
                      "required": [
                        "transactionIndex"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "overdraftCoverage": {
                    "type": "string",
                    "enum": [
                      "opted-in",
                      "opted-out"
                    ]
                  },
                  "overdraftProtection": {
                    "type": "string",
                    "enum": [
                      "none",
                      "enrolled"
                    ]
                  },
                  "americaFirstAccounts": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "share",
                            "savings",
                            "auto",
                            "mortgage",
                            "additional-mortgage",
                            "line-credit",
                            "visa"
                          ]
                        },
                        "accountMasked": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32,
                          "pattern": "^[*Xx•\\d -]+$"
                        },
                        "openingCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "depositCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "withdrawalCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "annualRateBps": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "advanceCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "purchaseCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "feeCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "principalCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "dueDate": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "creditLimitCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "minimumPaymentCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "rewards": {
                    "type": "object",
                    "properties": {
                      "openingPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "earnedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "redeemedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "expiringPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "expirationDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "phone": {
                "type": "object",
                "properties": {
                  "details": {
                    "type": "object",
                    "properties": {
                      "periodEnd": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "cycleStart": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "cycleEnd": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "paymentDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "noticeDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "autoPayDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "autoPayEnabled": {
                        "type": "boolean"
                      },
                      "paymentReference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "serviceLabel": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "charges": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "feeCents",
                            "adjustmentCents",
                            "planChangeCents",
                            "universalCents",
                            "recoveryCents",
                            "taxGrossCents",
                            "taxStateCents",
                            "taxLocalCents",
                            "taxExciseCents",
                            "taxCountyCents",
                            "accountFederalCents",
                            "publicSafetyUnitCents",
                            "policeSafetyUnitCents",
                            "wireless911UnitCents",
                            "wirelessTowerUnitCents",
                            "accountCreditCents",
                            "accountPlanDiscountCents",
                            "accountProtectionCents",
                            "lateFeeMinimumCents"
                          ]
                        },
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": -100000000,
                          "maximum": 100000000
                        }
                      },
                      "rates": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "taxRateBps",
                            "stateRateBps",
                            "localRateBps",
                            "lateFeeRateBps",
                            "voiceAllocationBps",
                            "messagingAllocationBps",
                            "dataAllocationBps"
                          ]
                        },
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        }
                      },
                      "payments": {
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "amountCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100000000
                            }
                          },
                          "required": [
                            "date",
                            "amountCents"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "lines": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "callCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000
                            },
                            "talkMinutes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000
                            },
                            "number": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "planName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "device": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "deviceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "agreement": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "promotionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "installments": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 120
                            },
                            "installment": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 120
                            },
                            "remaining": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 120
                            },
                            "upgradeDate": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "usageHundredthsGb": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000000
                            },
                            "charges": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "enum": [
                                  "basePlanCents",
                                  "deviceInstallmentCents",
                                  "promotionCents",
                                  "serviceCents",
                                  "autoPayCents",
                                  "targetedCents",
                                  "administrativeCents",
                                  "regulatoryCents",
                                  "federalCents",
                                  "administrativeDiscountCents",
                                  "regulatoryDiscountCents",
                                  "changeCents",
                                  "widebandAccessCents",
                                  "widebandCreditCents",
                                  "usageCents",
                                  "universalCents",
                                  "emergencyCents"
                                ]
                              },
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": -100000000,
                                "maximum": 100000000
                              }
                            },
                            "rates": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "enum": [
                                  "stateRateBps",
                                  "localRateBps"
                                ]
                              },
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              }
                            },
                            "calls": {
                              "maxItems": 300,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "date": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  },
                                  "minuteOfDay": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1439
                                  },
                                  "number": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 40
                                  },
                                  "origination": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "destination": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "minutes": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  "airtimeCents": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  },
                                  "otherCents": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  }
                                },
                                "required": [
                                  "date",
                                  "minuteOfDay",
                                  "number",
                                  "origination",
                                  "destination",
                                  "minutes",
                                  "airtimeCents",
                                  "otherCents"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "accountNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9 -]*$"
                  },
                  "invoiceNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "dueDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "previousBalanceCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "paymentsCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "basePlanCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "serviceCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "deviceInstallmentCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "restoreFeeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "promotionCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "oneTimeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "lineCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "lineNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "usageHundredthsGb": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000000
                  },
                  "talkMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "messages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "callCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "additionalProperties": false
              },
              "agreement": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierRepresentative": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "supplierPhone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "supplierBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierBankAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierBeneficiaryAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierAccountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierRoutingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierTransitMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierInstitutionMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierSwiftMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "representativeTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "supplierTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "dailyCallVolume": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "callRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "outboundCallRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "clientBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "guarantorDateOfBirth": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "businessRegistrationNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "guarantorTaxIdLast4": {
                    "type": "string",
                    "pattern": "^\\d{4}$"
                  },
                  "preferredContactMethod": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "contactHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "paymentProcessor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "integrationMethod": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "omsCrm": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "initialPallets": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "skuCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "monthlyOrderVolume": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "handleReturns": {
                    "type": "boolean"
                  },
                  "fulfillmentServiceMode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "website": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "clientCity": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientState": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientPostalCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "clientCountry": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientAddressLine2": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "apiCalls": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "contractVersion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "weekdayHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "offHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "weekendHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "weekendOffHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "governingLaw": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "clientSignatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "supplierSignatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "products": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "lateFeeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "inventoryAccuracyFloorBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "inventoryAccuracyTargetBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "termMonths": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 120
                  },
                  "prepaidMonths": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 120
                  },
                  "monthlyCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "transactionCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "setupCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "revenueBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "serviceBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "minuteRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "threadRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "emailRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "threads": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "emails": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "salesCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "commissionBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "retainerCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "netDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 365
                  },
                  "rates": {
                    "type": "object",
                    "properties": {
                      "chargeback": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "cdrnEthoca": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "vmpi": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "rdr": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "sale": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "credit": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "monthlyMinimum": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "integration": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "invoice": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierRepresentative": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "supplierPhone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "supplierBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierBankAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierBeneficiaryAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierAccountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierRoutingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierTransitMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierInstitutionMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierSwiftMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "commercialReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "items": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240
                        },
                        "sku": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "unitCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000
                        }
                      },
                      "required": [
                        "description",
                        "sku",
                        "quantity",
                        "unitCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "discountBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "taxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "shippingCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "additionalProperties": false
              },
              "tax": {
                "type": "object",
                "properties": {
                  "filingStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married-joint",
                      "married-separate",
                      "head-of-household",
                      "qualifying-surviving-spouse"
                    ]
                  },
                  "digitalAssets": {
                    "type": "boolean"
                  },
                  "qualifyingPersonName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "electionSpouseName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "electionSpouseSsnMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 11,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "identityProtectionPinMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 6,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "formerSpouseSsnMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 11,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "deceasedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "spouseDeceasedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "otherFiledStatus": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "otherEarnedIncomeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "otherTaxForm": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "flags": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "taxpayerClaimable",
                        "spouseClaimable",
                        "spouseItemizes",
                        "dualStatusAlien",
                        "taxpayerOlder",
                        "taxpayerBlind",
                        "spouseOlder",
                        "spouseBlind",
                        "presidentialFundTaxpayer",
                        "presidentialFundSpouse",
                        "nonresidentSpouseElection",
                        "lumpSumElection",
                        "scheduleDNotRequired",
                        "taxForm8814",
                        "taxForm4972",
                        "taxOtherForm",
                        "form8888",
                        "mainHomeUs",
                        "filedUnder30191002",
                        "combatZone",
                        "livedApartLastSixMonths",
                        "childQualifiedDividends",
                        "childOrdinaryDividends",
                        "iraRollover",
                        "iraQcd",
                        "iraOther",
                        "pensionRollover",
                        "pensionPso",
                        "pensionOther",
                        "livedApartEntireYear",
                        "childCapitalGain",
                        "clergyScheduleSe",
                        "declineEic",
                        "declineActc"
                      ]
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  },
                  "lineAmounts": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "7",
                        "13",
                        "17",
                        "19",
                        "20",
                        "23",
                        "26",
                        "27",
                        "28",
                        "29",
                        "30",
                        "31",
                        "36",
                        "38",
                        "1b",
                        "1c",
                        "1d",
                        "1e",
                        "1f",
                        "1g",
                        "1h",
                        "1i",
                        "2a",
                        "3a",
                        "4a",
                        "4b",
                        "5a",
                        "5b",
                        "6a",
                        "6b",
                        "7a",
                        "13a",
                        "13b",
                        "25b",
                        "25c",
                        "27a"
                      ]
                    },
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": -999999999,
                      "maximum": 999999999
                    }
                  },
                  "spouse": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "lastName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "ssnMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 11,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "occupation": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "signatureDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "identityProtectionPinMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 6,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      }
                    },
                    "additionalProperties": false
                  },
                  "dependents": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "firstName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "lastName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "ssnMasked": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 11,
                          "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                        },
                        "relationship": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "childTaxCredit": {
                          "type": "boolean"
                        },
                        "otherDependentCredit": {
                          "type": "boolean"
                        },
                        "livedWithYou": {
                          "type": "boolean"
                        },
                        "livedInUs": {
                          "type": "boolean"
                        },
                        "fullTimeStudent": {
                          "type": "boolean"
                        },
                        "disabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "firstName",
                        "lastName",
                        "relationship"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "refund": {
                    "type": "object",
                    "properties": {
                      "routingMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 9,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "accountMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 17,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "accountType": {
                        "type": "string",
                        "enum": [
                          "checking",
                          "savings"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "thirdParty": {
                    "type": "object",
                    "properties": {
                      "authorized": {
                        "type": "boolean"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "phone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "pinMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 5,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      }
                    },
                    "required": [
                      "authorized"
                    ],
                    "additionalProperties": false
                  },
                  "preparer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "signatureDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "ptin": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 20
                      },
                      "firmName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "phone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "address": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "einMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 12,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "selfEmployed": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "occupation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "signatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "wages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "householdWages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "interest": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "dividends": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "additionalIncome": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "adjustments": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "deduction": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "illustrativeTax": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "withholding": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  }
                },
                "additionalProperties": false
              },
              "confirmation": {
                "type": "object",
                "properties": {
                  "refundCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "refundMethod": {
                    "type": "string",
                    "enum": [
                      "bank",
                      "check"
                    ]
                  },
                  "acceptedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "acceptedClock": {
                    "type": "string",
                    "pattern": "^(0[1-9]|1[0-2]):[0-5]\\d (AM|PM) [A-Z]{2,5}$"
                  },
                  "printedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "printedClock": {
                    "type": "string",
                    "pattern": "^(0[1-9]|1[0-2]):[0-5]\\d (AM|PM) [A-Z]{2,5}$"
                  },
                  "username": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 40,
                    "pattern": "^[a-z0-9._-]+$"
                  },
                  "taxpayerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "greetingName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "mailCity": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "mailState": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$"
                  },
                  "mailZip": {
                    "type": "string",
                    "pattern": "^\\d{5}(?:-\\d{4})?$"
                  },
                  "deadline": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "adjustedGrossIncomeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "taxableIncomeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "totalTaxCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "totalPaymentsCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "effectiveRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "routingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 9,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "accountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 17,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "taxYear": {
                    "type": "integer",
                    "minimum": 2024,
                    "maximum": 2100
                  }
                },
                "additionalProperties": false
              },
              "certificate": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "issuingBody": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "accreditation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "validFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "validTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "bankAccountOpenedDate": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          }
        },
        "required": [
          "type",
          "templateId"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "companyIds",
    "documents"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ companyIds: string[]; documents: { type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfileId?: string | undefined; periodStart?: string | undefined; periodEnd?: string | undefined; monthCount?: number | undefined; bankStatement?: { openingBalanceCents: number; closingBalanceCents: number; balanceMode?: "expense-ratio" | "exact-balances" | undefined; dailyCreditPolicy?: "business_days" | "every_day" | "profile_frequency" | undefined; totalCreditsCents?: number | undefined; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; } | undefined; processing?: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; } | { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix?: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[] | undefined; fees?: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; shareBps?: number | undefined; percent?: string | undefined; unitUsd?: string | undefined; flatCents?: number | undefined; minimumCents?: number | undefined; direction?: "charge" | "credit" | undefined; collection?: "withheld" | "invoiced" | undefined; prepaidCents?: number | undefined; months?: number[] | undefined; }[] | undefined; activity?: { salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; authorizationMultiplierBps?: number | undefined; avsCoverageBps?: number | undefined; declineRateBps?: number | undefined; refundAmountBps?: number | undefined; chargebackAmountBps?: number | undefined; priorRefunds?: { date: string; count: number; amountCents: number; }[] | undefined; priorChargebacks?: { date: string; count: number; amountCents: number; }[] | undefined; recoveries?: { date: string; count: number; amountCents: number; }[] | undefined; adjustments?: { date: string; amountCents: number; description: string; }[] | undefined; } | undefined; reserve?: { openingCents?: number | undefined; basis?: "gross_sales" | "net_sales" | undefined; capCents?: number | undefined; releases?: { date: string; amountCents: number; }[] | undefined; } | undefined; balances?: { openingAvailableCents?: number | undefined; openingPending?: { availableOn: string; amountCents: number; }[] | undefined; openingHeldCents?: number | undefined; closingAvailableCents?: number | undefined; } | undefined; holds?: { date: string; action: "hold" | "release"; amountCents: number; }[] | undefined; settlement?: { lagBusinessDays?: number | undefined; minimumPayoutCents?: number | undefined; continuousActivity?: boolean | undefined; } | undefined; priorYearToDate?: { year?: number | undefined; grossSalesCents?: number | undefined; salesCount?: number | undefined; } | undefined; }; } | undefined; processingTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; confirmationTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; includeConfirmation?: boolean | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; initialDeposit?: { date: string; amountCents: number; } | undefined; mode?: "expense-engine" | "initial-deposit" | undefined; documentOptions?: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; }[]; }
```

Validation: z
        .strictObject({
          companyIds: z.array(z.uuid()).min(1).max(100),
          documents: z.array(createDocumentSelectionSchema).min(1).max(1000),
        })


### Expected responses

HTTP 200

```ts
string
```

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
text/csv; charset=utf-8 — CSV file bytes
```


## POST /v1/document-configurations/import

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 6291456 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/document-configurations/import" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "csv": {
      "type": "string",
      "maxLength": 5000000
    }
  },
  "required": [
    "csv"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ csv: string; }
```

Validation: z.strictObject({ csv: z.string().max(5_000_000) })


### Expected responses

HTTP 200

```ts
{ data: DocumentConfiguration; }
```

HTTP 400

```ts
{ error: string; }
```


## POST /v1/document-controls

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/document-controls" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "pause",
        "resume",
        "cancel"
      ]
    },
    "generationId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "documentId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    }
  },
  "required": [
    "action"
  ]
}
```

Input type:

```ts
{ action: "pause" | "resume" | "cancel"; generationId?: string | undefined; documentId?: string | undefined; type?: string | undefined; }
```

Validation: z
      .object({
        action: z.enum(['pause', 'resume', 'cancel']),
        generationId: z.uuid().optional(),
        documentId: z.uuid().optional(),
        type: z.string().min(1).max(80).optional(),
      })
      .refine((v) => Boolean(v.generationId) !== Boolean(v.documentId))
      .refine((v) => !v.type || Boolean(v.generationId))


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ changed: any; }
```


## GET /v1/document-generations

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/document-generations" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 120
    },
    "type": {
      "type": "string",
      "maxLength": 80
    },
    "status": {
      "type": "string",
      "enum": [
        "processing",
        "ready",
        "partial",
        "failed",
        "paused",
        "cancelled"
      ]
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; search?: string | undefined; type?: string | undefined; status?: "ready" | "processing" | "partial" | "failed" | "paused" | "cancelled" | undefined; }
```

Validation: listQuery


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: never[]; total: number; }
```


## GET /v1/document-generations/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/document-generations/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ id: string; data: { filename: string; request_key: string; request_position: number; attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }[]; total: number; }
```


## GET /v1/document-generations/:id/archive

Authentication: api-key-or-session. Rate limit: 6 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/document-generations/:id/archive" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    }
  }
}
```

Input type:

```ts
{ type?: string | undefined; }
```

Validation: z
        .object({
          type: z
            .string()
            .regex(/^[a-z0-9-]+$/)
            .optional(),
        })


### Expected responses

HTTP 429

```ts
{ error: string; }
```

HTTP 200

```ts
string
```

HTTP 404

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 413

```ts
{ error: string; }
```

HTTP 200

```ts
Buffer<ArrayBuffer>
```

HTTP 200

```ts
application/zip — binary ZIP archive
```


## POST /v1/document-generations/:id/regenerate

Authentication: api-key-or-session. Rate limit: 12 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/document-generations/:id/regenerate" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ requiresCurrentRegeneration: boolean; }
```

HTTP 202

```ts
{ queued: any; }
```


## GET /v1/document-generations/:id/regeneration-settings

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/document-generations/:id/regeneration-settings" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ companyIds?: string[] | undefined; documents: { type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfileId?: string | undefined; periodStart?: string | undefined; periodEnd?: string | undefined; monthCount?: number | undefined; bankStatement?: { openingBalanceCents: number; closingBalanceCents: number; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; balanceMode?: "expense-ratio" | "exact-balances" | undefined; totalCreditsCents?: number | undefined; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; } | undefined; processing?: ProcessingStatementSettings | undefined; processingTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; confirmationTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; includeConfirmation?: boolean | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; initialDeposit?: { date: string; amountCents: number; } | undefined; mode?: "expense-engine" | "initial-deposit" | undefined; documentOptions?: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; }[]; companyId?: string | undefined; directorId?: string | null | undefined; }
```


## GET /v1/documents

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "type": {
      "type": "string",
      "enum": [
        "business-bank-statement",
        "business-bank-letter",
        "business-bank-statement-initial-deposit",
        "personal-bank-statement",
        "phone-bill",
        "utility-bill",
        "agreements",
        "processing-statement",
        "gmp-certificate",
        "supplier-invoice",
        "tax-return",
        "tax-return-confirmation"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "paused",
        "cancelled",
        "queued",
        "rendering",
        "rasterizing",
        "ready",
        "failed",
        "deleted"
      ]
    },
    "companyId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "search": {
      "type": "string",
      "maxLength": 120
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; type?: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation" | undefined; status?: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted" | undefined; companyId?: string | undefined; search?: string | undefined; }
```

Validation: documentListQuerySchema


### Expected responses

HTTP 200

```ts
{ data: { attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }[]; total: number; }
```


## POST /v1/documents

Authentication: api-key-or-session. Rate limit: 12 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/documents" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "requestKey": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "companyId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "companyIds": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "directorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "documents": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "business-bank-statement",
              "business-bank-letter",
              "business-bank-statement-initial-deposit",
              "personal-bank-statement",
              "phone-bill",
              "utility-bill",
              "agreements",
              "processing-statement",
              "gmp-certificate",
              "supplier-invoice",
              "tax-return",
              "tax-return-confirmation"
            ]
          },
          "templateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1"
            ]
          },
          "expenseProfileId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "monthCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "bankStatement": {
            "type": "object",
            "properties": {
              "balanceMode": {
                "type": "string",
                "enum": [
                  "expense-ratio",
                  "exact-balances"
                ]
              },
              "openingBalanceCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000000
              },
              "closingBalanceCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000000
              },
              "dailyCreditPolicy": {
                "default": "business_days",
                "type": "string",
                "enum": [
                  "business_days",
                  "every_day",
                  "profile_frequency"
                ]
              },
              "totalCreditsCents": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100000000000
              },
              "expenseAllocation": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "minPercent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100,
                      "multipleOf": 0.01
                    },
                    "maxPercent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100,
                      "multipleOf": 0.01
                    },
                    "percent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "category",
                    "percent"
                  ],
                  "additionalProperties": false
                }
              },
              "expenseRatio": {
                "type": "object",
                "properties": {
                  "minBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "maxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "minBps",
                  "maxBps"
                ],
                "additionalProperties": false
              },
              "payoutTiming": {
                "type": "object",
                "properties": {
                  "settlementDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  },
                  "bankTransferDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 5
                  },
                  "variationPercent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 80
                  },
                  "spikeProbabilityPercent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  }
                },
                "required": [
                  "settlementDays",
                  "bankTransferDays",
                  "variationPercent",
                  "spikeProbabilityPercent"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "openingBalanceCents",
              "closingBalanceCents"
            ],
            "additionalProperties": false
          },
          "processing": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "feeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "reserveBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "refundRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "chargebackRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "aovCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000000
                  }
                },
                "required": [
                  "feeBps",
                  "reserveBps",
                  "refundRateBps",
                  "chargebackRateBps",
                  "aovCents"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "feeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "reserveBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "refundRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "chargebackRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "aovCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000000
                  },
                  "advanced": {
                    "type": "object",
                    "properties": {
                      "paymentMix": {
                        "default": [
                          {
                            "brand": "visa",
                            "shareBps": 6000
                          },
                          {
                            "brand": "mastercard",
                            "shareBps": 3000
                          },
                          {
                            "brand": "amex",
                            "shareBps": 700
                          },
                          {
                            "brand": "discover",
                            "shareBps": 300
                          }
                        ],
                        "minItems": 1,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "brand": {
                              "type": "string",
                              "enum": [
                                "visa",
                                "mastercard",
                                "amex",
                                "discover",
                                "other"
                              ]
                            },
                            "shareBps": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10000
                            }
                          },
                          "required": [
                            "brand",
                            "shareBps"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "fees": {
                        "default": [],
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "category": {
                              "type": "string",
                              "enum": [
                                "processing",
                                "authorization",
                                "interchange",
                                "network",
                                "dispute",
                                "account",
                                "other"
                              ]
                            },
                            "basis": {
                              "type": "string",
                              "enum": [
                                "gross_sales",
                                "net_sales",
                                "sales_and_refunds",
                                "sales",
                                "refunds",
                                "disputes",
                                "authorizations",
                                "avs",
                                "declines",
                                "batches",
                                "payouts",
                                "month"
                              ]
                            },
                            "brand": {
                              "type": "string",
                              "enum": [
                                "visa",
                                "mastercard",
                                "amex",
                                "discover",
                                "other"
                              ]
                            },
                            "shareBps": {
                              "default": 10000,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "percent": {
                              "default": "0",
                              "type": "string",
                              "pattern": "^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,9})?$"
                            },
                            "unitUsd": {
                              "default": "0",
                              "type": "string",
                              "pattern": "^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,9})?$"
                            },
                            "flatCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "minimumCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "direction": {
                              "default": "charge",
                              "type": "string",
                              "enum": [
                                "charge",
                                "credit"
                              ]
                            },
                            "collection": {
                              "default": "withheld",
                              "type": "string",
                              "enum": [
                                "withheld",
                                "invoiced"
                              ]
                            },
                            "prepaidCents": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "months": {
                              "default": [],
                              "maxItems": 12,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 12
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "category",
                            "basis"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "activity": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "salesCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "reversalVersion": {
                            "type": "number",
                            "const": 2
                          },
                          "aovRangeCents": {
                            "type": "object",
                            "properties": {
                              "minCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "maxCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              }
                            },
                            "required": [
                              "minCents",
                              "maxCents"
                            ],
                            "additionalProperties": false
                          },
                          "refundRateRangeBps": {
                            "type": "object",
                            "properties": {
                              "minBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              },
                              "maxBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              }
                            },
                            "required": [
                              "minBps",
                              "maxBps"
                            ],
                            "additionalProperties": false
                          },
                          "chargebackRateRangeBps": {
                            "type": "object",
                            "properties": {
                              "minBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              },
                              "maxBps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9999
                              }
                            },
                            "required": [
                              "minBps",
                              "maxBps"
                            ],
                            "additionalProperties": false
                          },
                          "saleAmountRange": {
                            "type": "object",
                            "properties": {
                              "minCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "maxCents": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000000000
                              },
                              "distributionVersion": {
                                "type": "number",
                                "const": 2
                              }
                            },
                            "required": [
                              "minCents",
                              "maxCents"
                            ],
                            "additionalProperties": false
                          },
                          "authorizationMultiplierBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "avsCoverageBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "declineRateBps": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "refundAmountBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "chargebackAmountBps": {
                            "default": 10000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "priorRefunds": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "priorChargebacks": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "recoveries": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "count",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "adjustments": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 180
                                }
                              },
                              "required": [
                                "date",
                                "amountCents",
                                "description"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "reserve": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "openingCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "basis": {
                            "default": "gross_sales",
                            "type": "string",
                            "enum": [
                              "gross_sales",
                              "net_sales"
                            ]
                          },
                          "capCents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "releases": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "date",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "balances": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "openingAvailableCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "openingPending": {
                            "default": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "availableOn": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "amountCents": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "availableOn",
                                "amountCents"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "openingHeldCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "closingAvailableCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "holds": {
                        "default": [],
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "action": {
                              "type": "string",
                              "enum": [
                                "hold",
                                "release"
                              ]
                            },
                            "amountCents": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "date",
                            "action",
                            "amountCents"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "settlement": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "lagBusinessDays": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "minimumPayoutCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "continuousActivity": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      "priorYearToDate": {
                        "default": {},
                        "type": "object",
                        "properties": {
                          "year": {
                            "default": 2026,
                            "type": "integer",
                            "minimum": 1900,
                            "maximum": 9999
                          },
                          "grossSalesCents": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "salesCount": {
                            "default": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "feeBps",
                  "reserveBps",
                  "refundRateBps",
                  "chargebackRateBps",
                  "aovCents",
                  "advanced"
                ],
                "additionalProperties": false
              }
            ]
          },
          "processingTemplateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1"
            ]
          },
          "confirmationTemplateId": {
            "type": "string",
            "enum": [
              "agreements-fulfillment-box-v1",
              "agreements-fulfillment-hub-v1",
              "agreements-chargeback-cb911-v1",
              "agreements-customer-service-ztech-v1",
              "agreements-fulfillment-efs-v1",
              "agreements-fulfillment-ninja-v1",
              "agreements-fulfillment-fullstack-v1",
              "agreements-fulfillment-x-v1",
              "personal-bank-statement-wells-fargo-v1",
              "personal-bank-statement-chase-v1",
              "personal-bank-statement-sofi-v1",
              "personal-bank-statement-america-first-v1",
              "phone-bill-verizon-v1",
              "personal-bank-statement-woodforest-v1",
              "personal-bank-statement-go2bank-v1",
              "personal-bank-statement-boa-v1",
              "personal-bank-statement-usaa-v1",
              "personal-bank-statement-commerce-v1",
              "personal-bank-statement-paypal-v1",
              "personal-bank-statement-ascend-v1",
              "personal-bank-statement-navy-federal-v1",
              "personal-bank-statement-ibc-v1",
              "personal-bank-statement-pnc-v1",
              "personal-bank-statement-cash-app-v1",
              "personal-bank-statement-penn-community-v1",
              "phone-bill-uscellular-v1",
              "phone-bill-metro-v1",
              "utility-bill-kentuckypower-v1",
              "utility-bill-duke-v1",
              "utility-bill-evergy-v1",
              "utility-bill-pge-v1",
              "utility-bill-nvenergy-v1",
              "utility-bill-columbiagas-v1",
              "utility-bill-xoom-v1",
              "utility-bill-fpl-v1",
              "utility-bill-aps-v1",
              "utility-bill-ouc-v1",
              "utility-bill-gng-v1",
              "tax-return-2025-v1",
              "phone-bill-tmobile-v1",
              "phone-bill-xfinity-v1",
              "phone-bill-spectrum-v1",
              "personal-bank-statement-varo-v1",
              "tax-return-2024-v1",
              "agreements-crm-sticky-v1",
              "agreements-chargeback-v1",
              "agreements-fulfillment-nextday-v1",
              "agreements-customer-service-logicall-v1",
              "utility-bill-att-v1",
              "tax-return-confirmation-freetaxusa-2025-v1",
              "tax-return-confirmation-freetaxusa-2024-v1",
              "tax-return-confirmation-turbotax-2025-v1",
              "business-bank-letter-mercury-v1",
              "business-bank-letter-bluebanc-v1",
              "business-bank-letter-slash-v1",
              "business-bank-statement-slash-v1",
              "business-bank-statement-bluebanc-v1",
              "business-bank-statement-relay-v1",
              "business-bank-statement-mercury-v1",
              "personal-bank-statement-dailypay-v1",
              "personal-bank-statement-chime-v1",
              "personal-bank-statement-capitalone-v1",
              "personal-bank-statement-bmo-v1",
              "phone-bill-att-v1",
              "processing-statement-kurv-v1",
              "processing-statement-netevia-v1",
              "processing-statement-paysafe-v1",
              "processing-statement-shopify-v1",
              "processing-statement-stripe-v1",
              "processing-statement-stripe-v2",
              "gmp-certificate-blastup-v1"
            ]
          },
          "includeConfirmation": {
            "type": "boolean"
          },
          "processingDocumentFields": {
            "type": "object",
            "properties": {
              "merchantNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "associationNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "officeNumber": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "processorAccountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "controlReference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "mailingReference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "dbaName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "locationAddress": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "recipientName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 250
              },
              "disputeWithdrawalRangeBps": {
                "type": "object",
                "properties": {
                  "minBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "maxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "minBps",
                  "maxBps"
                ],
                "additionalProperties": false
              },
              "disputeWithdrawalBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              },
              "thirdPartyAdjustmentIndexes": {
                "maxItems": 1000,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 999
                }
              }
            },
            "additionalProperties": false
          },
          "initialDeposit": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "amountCents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000000000
              }
            },
            "required": [
              "date",
              "amountCents"
            ],
            "additionalProperties": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "expense-engine",
              "initial-deposit"
            ]
          },
          "documentOptions": {
            "type": "object",
            "properties": {
              "bank": {
                "type": "object",
                "properties": {
                  "statementTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "priorYtd": {
                    "type": "object",
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "feesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      },
                      "interestAndBonusesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      },
                      "overdraftFeesCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000000
                      }
                    },
                    "required": [
                      "year"
                    ],
                    "additionalProperties": false
                  },
                  "letterSignatoryName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "letterSignatoryTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "statementReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "mailingReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "transactionReferences": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "transactionIndex": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "reference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "checkNumber": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        }
                      },
                      "required": [
                        "transactionIndex"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "overdraftCoverage": {
                    "type": "string",
                    "enum": [
                      "opted-in",
                      "opted-out"
                    ]
                  },
                  "overdraftProtection": {
                    "type": "string",
                    "enum": [
                      "none",
                      "enrolled"
                    ]
                  },
                  "americaFirstAccounts": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "share",
                            "savings",
                            "auto",
                            "mortgage",
                            "additional-mortgage",
                            "line-credit",
                            "visa"
                          ]
                        },
                        "accountMasked": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32,
                          "pattern": "^[*Xx•\\d -]+$"
                        },
                        "openingCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "depositCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "withdrawalCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "annualRateBps": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "advanceCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "purchaseCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "feeCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "principalCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "dueDate": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "creditLimitCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "minimumPaymentCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "rewards": {
                    "type": "object",
                    "properties": {
                      "openingPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "earnedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "redeemedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "expiringPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "expirationDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "phone": {
                "type": "object",
                "properties": {
                  "details": {
                    "type": "object",
                    "properties": {
                      "periodEnd": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "cycleStart": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "cycleEnd": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "paymentDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "noticeDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "autoPayDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "autoPayEnabled": {
                        "type": "boolean"
                      },
                      "paymentReference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "serviceLabel": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "charges": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "feeCents",
                            "adjustmentCents",
                            "planChangeCents",
                            "universalCents",
                            "recoveryCents",
                            "taxGrossCents",
                            "taxStateCents",
                            "taxLocalCents",
                            "taxExciseCents",
                            "taxCountyCents",
                            "accountFederalCents",
                            "publicSafetyUnitCents",
                            "policeSafetyUnitCents",
                            "wireless911UnitCents",
                            "wirelessTowerUnitCents",
                            "accountCreditCents",
                            "accountPlanDiscountCents",
                            "accountProtectionCents",
                            "lateFeeMinimumCents"
                          ]
                        },
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": -100000000,
                          "maximum": 100000000
                        }
                      },
                      "rates": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "taxRateBps",
                            "stateRateBps",
                            "localRateBps",
                            "lateFeeRateBps",
                            "voiceAllocationBps",
                            "messagingAllocationBps",
                            "dataAllocationBps"
                          ]
                        },
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        }
                      },
                      "payments": {
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "amountCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100000000
                            }
                          },
                          "required": [
                            "date",
                            "amountCents"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "lines": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "callCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000
                            },
                            "talkMinutes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000
                            },
                            "number": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "planName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "device": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "deviceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "agreement": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "promotionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "installments": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 120
                            },
                            "installment": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 120
                            },
                            "remaining": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 120
                            },
                            "upgradeDate": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "usageHundredthsGb": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000000
                            },
                            "charges": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "enum": [
                                  "basePlanCents",
                                  "deviceInstallmentCents",
                                  "promotionCents",
                                  "serviceCents",
                                  "autoPayCents",
                                  "targetedCents",
                                  "administrativeCents",
                                  "regulatoryCents",
                                  "federalCents",
                                  "administrativeDiscountCents",
                                  "regulatoryDiscountCents",
                                  "changeCents",
                                  "widebandAccessCents",
                                  "widebandCreditCents",
                                  "usageCents",
                                  "universalCents",
                                  "emergencyCents"
                                ]
                              },
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": -100000000,
                                "maximum": 100000000
                              }
                            },
                            "rates": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "enum": [
                                  "stateRateBps",
                                  "localRateBps"
                                ]
                              },
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              }
                            },
                            "calls": {
                              "maxItems": 300,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "date": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  },
                                  "minuteOfDay": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1439
                                  },
                                  "number": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 40
                                  },
                                  "origination": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "destination": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "minutes": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  "airtimeCents": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  },
                                  "otherCents": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  }
                                },
                                "required": [
                                  "date",
                                  "minuteOfDay",
                                  "number",
                                  "origination",
                                  "destination",
                                  "minutes",
                                  "airtimeCents",
                                  "otherCents"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "accountNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9 -]*$"
                  },
                  "invoiceNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "dueDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "previousBalanceCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "paymentsCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "basePlanCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "serviceCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "deviceInstallmentCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "restoreFeeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "promotionCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "oneTimeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "lineCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "lineNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "usageHundredthsGb": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000000
                  },
                  "talkMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "messages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "callCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "additionalProperties": false
              },
              "agreement": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierRepresentative": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "supplierPhone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "supplierBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierBankAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierBeneficiaryAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierAccountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierRoutingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierTransitMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierInstitutionMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierSwiftMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "representativeTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "supplierTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "dailyCallVolume": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "callRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "outboundCallRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "clientBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "guarantorDateOfBirth": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "businessRegistrationNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "guarantorTaxIdLast4": {
                    "type": "string",
                    "pattern": "^\\d{4}$"
                  },
                  "preferredContactMethod": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "contactHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "paymentProcessor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "integrationMethod": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "omsCrm": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "initialPallets": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "skuCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "monthlyOrderVolume": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "handleReturns": {
                    "type": "boolean"
                  },
                  "fulfillmentServiceMode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "website": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "clientCity": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientState": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientPostalCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "clientCountry": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "clientAddressLine2": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "apiCalls": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "contractVersion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "weekdayHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "offHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "weekendHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "weekendOffHours": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "governingLaw": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "clientSignatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "supplierSignatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "products": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "lateFeeBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "inventoryAccuracyFloorBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "inventoryAccuracyTargetBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "termMonths": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 120
                  },
                  "prepaidMonths": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 120
                  },
                  "monthlyCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "transactionCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "setupCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "revenueBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "serviceBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "minuteRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "threadRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "emailRateCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "threads": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "emails": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "salesCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "commissionBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "retainerCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "netDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 365
                  },
                  "rates": {
                    "type": "object",
                    "properties": {
                      "chargeback": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "cdrnEthoca": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "vmpi": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "rdr": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "sale": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "credit": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "monthlyMinimum": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "integration": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "invoice": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierRepresentative": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "supplierPhone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "supplierBankName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "supplierBankAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierBeneficiaryAddress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "supplierAccountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierRoutingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierTransitMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierInstitutionMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "supplierSwiftMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^(?=.*(?:[*•]|[xX]{2}))[A-Za-z0-9*xX• -]+$"
                  },
                  "commercialReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "items": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240
                        },
                        "sku": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "unitCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000
                        }
                      },
                      "required": [
                        "description",
                        "sku",
                        "quantity",
                        "unitCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "discountBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "taxBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "shippingCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "additionalProperties": false
              },
              "tax": {
                "type": "object",
                "properties": {
                  "filingStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married-joint",
                      "married-separate",
                      "head-of-household",
                      "qualifying-surviving-spouse"
                    ]
                  },
                  "digitalAssets": {
                    "type": "boolean"
                  },
                  "qualifyingPersonName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "electionSpouseName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "electionSpouseSsnMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 11,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "identityProtectionPinMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 6,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "formerSpouseSsnMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 11,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "deceasedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "spouseDeceasedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "otherFiledStatus": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "otherEarnedIncomeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "otherTaxForm": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "flags": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "taxpayerClaimable",
                        "spouseClaimable",
                        "spouseItemizes",
                        "dualStatusAlien",
                        "taxpayerOlder",
                        "taxpayerBlind",
                        "spouseOlder",
                        "spouseBlind",
                        "presidentialFundTaxpayer",
                        "presidentialFundSpouse",
                        "nonresidentSpouseElection",
                        "lumpSumElection",
                        "scheduleDNotRequired",
                        "taxForm8814",
                        "taxForm4972",
                        "taxOtherForm",
                        "form8888",
                        "mainHomeUs",
                        "filedUnder30191002",
                        "combatZone",
                        "livedApartLastSixMonths",
                        "childQualifiedDividends",
                        "childOrdinaryDividends",
                        "iraRollover",
                        "iraQcd",
                        "iraOther",
                        "pensionRollover",
                        "pensionPso",
                        "pensionOther",
                        "livedApartEntireYear",
                        "childCapitalGain",
                        "clergyScheduleSe",
                        "declineEic",
                        "declineActc"
                      ]
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  },
                  "lineAmounts": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "7",
                        "13",
                        "17",
                        "19",
                        "20",
                        "23",
                        "26",
                        "27",
                        "28",
                        "29",
                        "30",
                        "31",
                        "36",
                        "38",
                        "1b",
                        "1c",
                        "1d",
                        "1e",
                        "1f",
                        "1g",
                        "1h",
                        "1i",
                        "2a",
                        "3a",
                        "4a",
                        "4b",
                        "5a",
                        "5b",
                        "6a",
                        "6b",
                        "7a",
                        "13a",
                        "13b",
                        "25b",
                        "25c",
                        "27a"
                      ]
                    },
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": -999999999,
                      "maximum": 999999999
                    }
                  },
                  "spouse": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "lastName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "ssnMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 11,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "occupation": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "signatureDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "identityProtectionPinMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 6,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      }
                    },
                    "additionalProperties": false
                  },
                  "dependents": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "firstName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "lastName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "ssnMasked": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 11,
                          "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                        },
                        "relationship": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "childTaxCredit": {
                          "type": "boolean"
                        },
                        "otherDependentCredit": {
                          "type": "boolean"
                        },
                        "livedWithYou": {
                          "type": "boolean"
                        },
                        "livedInUs": {
                          "type": "boolean"
                        },
                        "fullTimeStudent": {
                          "type": "boolean"
                        },
                        "disabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "firstName",
                        "lastName",
                        "relationship"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "refund": {
                    "type": "object",
                    "properties": {
                      "routingMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 9,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "accountMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 17,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "accountType": {
                        "type": "string",
                        "enum": [
                          "checking",
                          "savings"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "thirdParty": {
                    "type": "object",
                    "properties": {
                      "authorized": {
                        "type": "boolean"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "phone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "pinMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 5,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      }
                    },
                    "required": [
                      "authorized"
                    ],
                    "additionalProperties": false
                  },
                  "preparer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "signatureDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "ptin": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 20
                      },
                      "firmName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "phone": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "address": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "einMasked": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 12,
                        "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                      },
                      "selfEmployed": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "occupation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "signatureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "wages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "householdWages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "interest": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "dividends": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "additionalIncome": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "adjustments": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "deduction": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "illustrativeTax": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "withholding": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  }
                },
                "additionalProperties": false
              },
              "confirmation": {
                "type": "object",
                "properties": {
                  "refundCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "refundMethod": {
                    "type": "string",
                    "enum": [
                      "bank",
                      "check"
                    ]
                  },
                  "acceptedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "acceptedClock": {
                    "type": "string",
                    "pattern": "^(0[1-9]|1[0-2]):[0-5]\\d (AM|PM) [A-Z]{2,5}$"
                  },
                  "printedDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "printedClock": {
                    "type": "string",
                    "pattern": "^(0[1-9]|1[0-2]):[0-5]\\d (AM|PM) [A-Z]{2,5}$"
                  },
                  "username": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 40,
                    "pattern": "^[a-z0-9._-]+$"
                  },
                  "taxpayerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250
                  },
                  "greetingName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "mailCity": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "mailState": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$"
                  },
                  "mailZip": {
                    "type": "string",
                    "pattern": "^\\d{5}(?:-\\d{4})?$"
                  },
                  "deadline": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "adjustedGrossIncomeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "taxableIncomeCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "totalTaxCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "totalPaymentsCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999999
                  },
                  "effectiveRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "routingMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 9,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "accountMasked": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 17,
                    "pattern": "^[Xx*•][Xx*• -]*(?:\\d{1,4})?$"
                  },
                  "taxYear": {
                    "type": "integer",
                    "minimum": 2024,
                    "maximum": 2100
                  }
                },
                "additionalProperties": false
              },
              "certificate": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "issuingBody": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "accreditation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "validFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "validTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "bankAccountOpenedDate": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          }
        },
        "required": [
          "type",
          "templateId"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "requestKey",
    "documents"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ requestKey: string; documents: { type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfileId?: string | undefined; periodStart?: string | undefined; periodEnd?: string | undefined; monthCount?: number | undefined; bankStatement?: { openingBalanceCents: number; closingBalanceCents: number; balanceMode?: "expense-ratio" | "exact-balances" | undefined; dailyCreditPolicy?: "business_days" | "every_day" | "profile_frequency" | undefined; totalCreditsCents?: number | undefined; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; } | undefined; processing?: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; } | { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix?: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[] | undefined; fees?: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; shareBps?: number | undefined; percent?: string | undefined; unitUsd?: string | undefined; flatCents?: number | undefined; minimumCents?: number | undefined; direction?: "charge" | "credit" | undefined; collection?: "withheld" | "invoiced" | undefined; prepaidCents?: number | undefined; months?: number[] | undefined; }[] | undefined; activity?: { salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; authorizationMultiplierBps?: number | undefined; avsCoverageBps?: number | undefined; declineRateBps?: number | undefined; refundAmountBps?: number | undefined; chargebackAmountBps?: number | undefined; priorRefunds?: { date: string; count: number; amountCents: number; }[] | undefined; priorChargebacks?: { date: string; count: number; amountCents: number; }[] | undefined; recoveries?: { date: string; count: number; amountCents: number; }[] | undefined; adjustments?: { date: string; amountCents: number; description: string; }[] | undefined; } | undefined; reserve?: { openingCents?: number | undefined; basis?: "gross_sales" | "net_sales" | undefined; capCents?: number | undefined; releases?: { date: string; amountCents: number; }[] | undefined; } | undefined; balances?: { openingAvailableCents?: number | undefined; openingPending?: { availableOn: string; amountCents: number; }[] | undefined; openingHeldCents?: number | undefined; closingAvailableCents?: number | undefined; } | undefined; holds?: { date: string; action: "hold" | "release"; amountCents: number; }[] | undefined; settlement?: { lagBusinessDays?: number | undefined; minimumPayoutCents?: number | undefined; continuousActivity?: boolean | undefined; } | undefined; priorYearToDate?: { year?: number | undefined; grossSalesCents?: number | undefined; salesCount?: number | undefined; } | undefined; }; } | undefined; includeConfirmation?: boolean | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; initialDeposit?: { date: string; amountCents: number; } | undefined; mode?: "expense-engine" | "initial-deposit" | undefined; documentOptions?: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; processingTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; confirmationTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; }[]; companyId?: string | undefined; companyIds?: string[] | undefined; directorId?: string | null | undefined; }
```

Validation: createSelectableDocumentsSchema


### Expected responses

HTTP 202

```ts
{ data: { attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }[]; }
```

HTTP 400

```ts
{ error: string; code: string; errors: { field: string; message: string; }[]; }
```


## DELETE /v1/documents/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/documents/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/documents/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ audit: { id: any; document_id: any; actor_id: any; action: any; created_at: any; }[]; attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }
```


## GET /v1/documents/:id/download

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents/:id/download" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
Buffer<ArrayBuffer>
```

HTTP 200

```ts
application/pdf — binary PDF bytes
```


## GET /v1/documents/:id/orders.csv

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents/:id/orders.csv" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
Readable
```

HTTP 200

```ts
text/csv; charset=utf-8 — CSV file bytes
```


## GET /v1/documents/:id/preview

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents/:id/preview" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
Buffer<ArrayBuffer>
```

HTTP 200

```ts
application/pdf — binary PDF bytes
```


## POST /v1/documents/:id/regenerate

Authentication: api-key-or-session. Rate limit: 12 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/documents/:id/regenerate" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ requiresCurrentRegeneration: boolean; }
```

HTTP 202

```ts
{ attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }
```


## GET /v1/documents/:id/regeneration-settings

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/documents/:id/regeneration-settings" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ companyIds?: string[] | undefined; documents: { type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfileId?: string | undefined; periodStart?: string | undefined; periodEnd?: string | undefined; monthCount?: number | undefined; bankStatement?: { openingBalanceCents: number; closingBalanceCents: number; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; balanceMode?: "expense-ratio" | "exact-balances" | undefined; totalCreditsCents?: number | undefined; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; } | undefined; processing?: ProcessingStatementSettings | undefined; processingTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; confirmationTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; includeConfirmation?: boolean | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; initialDeposit?: { date: string; amountCents: number; } | undefined; mode?: "expense-engine" | "initial-deposit" | undefined; documentOptions?: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; }[]; companyId?: string | undefined; directorId?: string | null | undefined; }
```


## POST /v1/documents/:id/retry

Authentication: api-key-or-session. Rate limit: 12 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/documents/:id/retry" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ requiresCurrentRegeneration: boolean; }
```

HTTP 202

```ts
{ attempts: number; snapshot?: { version: 1; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; } | null; } | { version: 2; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name?: string | undefined; category?: string | undefined; minAmountCents?: number | undefined; maxAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; behaviors?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }[] | undefined; }; bankStatement: { engineVersion: 2; currency: "USD"; seed: string; dailyCreditPolicy: "business_days" | "every_day"; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; label: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; balanceCents: number; behavior: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; direction: "in" | "out"; icon: "repeat" | "arrow-down-left" | "arrow-up-right" | "credit-card"; color: string; postingDays: "business_days" | "every_day"; }; }[]; }[]; }; } | { version: 3; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; } | { version: 4; processingStatement: { engineVersion: 1; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: 0; closingBalanceCents: 0; totals: { salesCount: number; grossSalesCents: number; payoutCount: number; payoutCents: number; actualAovCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; }; days: { availableBalanceCents: number; reserveBalanceCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; date: string; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; } | { engineVersion: 2; currency: "USD"; periodStart: string; periodEnd: string; settings: { feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; advanced: { paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }; }; openingReserveCents: number; closingReserveCents: number; openingBalanceCents: number; closingBalanceCents: number; carryIn: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; carryOut: { availableCents: number; pending: { availableOn: string; amountCents: number; }[]; heldCents: number; reserveCents: number; year: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; }; totals: { payoutCount: number; actualAovCents: number; currentRefundCount: number; currentRefundCents: number; currentChargebackCount: number; currentChargebackCents: number; priorRefundCount: number; priorRefundCents: number; priorChargebackCount: number; priorChargebackCents: number; recoveryCount: number; recoveryCents: number; adjustmentCents: number; authorizationCount: number; avsCount: number; declineCount: number; batchCount: number; netSalesCents: number; feeAssessedCents: number; feeWithheldCents: number; feeInvoicedCents: number; feePrepaidCents: number; feeDueCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; yearToDateGrossSalesCents: number; yearToDateSalesCount: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }; days: { date: string; availableBalanceCents: number; reserveBalanceCents: number; recoveryCents: number; adjustmentCents: number; reserveReleasedCents: number; heldCents: number; releasedHoldCents: number; pendingBalanceCents: number; heldBalanceCents: number; maturedCents: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; payoutCents: number; }[]; payouts: { bankTransactionId: string; date: string; amountCents: number; type: "ACH Credit" | "Card Credit"; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; brand: "visa" | "mastercard" | "amex" | "discover" | "other" | null; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; basisCount: number; basisAmountCents: number; assessedCents: number; withheldCents: number; invoicedCents: number; prepaidCents: number; dueCents: number; }[]; paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; netSalesCents: number; actualAovCents: number; feeCents: number; }[]; events: { date: string; type: "hold" | "prior_refund" | "prior_chargeback" | "recovery" | "adjustment" | "reserve_release" | "hold_release"; count: number; amountCents: number; description: string; }[]; batches: { id: string; date: string; availableOn: string; salesCount: number; grossSalesCents: number; refundCount: number; refundCents: number; chargebackCount: number; chargebackCents: number; feeCents: number; reserveWithheldCents: number; netCents: number; saleAmountDistribution?: { amountCents: number; count: number; }[] | undefined; refundSaleDistribution?: { amountCents: number; count: number; }[] | undefined; chargebackSaleDistribution?: { amountCents: number; count: number; }[] | undefined; }[]; balances: { openingAvailableCents: number; closingAvailableCents: number; openingPendingCents: number; closingPendingCents: number; openingHeldCents: number; closingHeldCents: number; openingReserveCents: number; closingReserveCents: number; }; }; statementPair: { id: string; bankDocumentId: string; processingDocumentId: string; bankType: "business-bank-statement" | "personal-bank-statement"; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: 1; expenseProfile: { name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; id: string; }; bankStatement: { engineVersion: 3; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; months: { month: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; transactions: { id: string; date: string; type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; amountCents: number; label: string; balanceCents: number; rowIndex: number; sequence: number; name: string; category: string; maxAmountCents: number; }[]; expenseRatioBps?: number | undefined; }[]; currency: "USD"; seed: string; periodStart: string; periodEnd: string; openingBalanceCents: number; closingBalanceCents: number; totalCreditsCents: number; totalDebitsCents: number; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; }; bankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; personalBankIdentifiers?: { bank_account_number?: string | undefined; bank_routing_number?: string | undefined; } | undefined; personalBankAccountMasked?: string | undefined; personalBankRoutingMasked?: string | undefined; standaloneProcessing?: true | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 5; documentType: "business-bank-letter" | "business-bank-statement-initial-deposit"; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; initialDeposit: { date: string; amountCents: number; } | null; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 6; documentType: "business-bank-statement"; mode: "initial-deposit"; initialDeposit: { date: string; amountCents: number; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: null; periodStart: string; monthCount: 1; bankIdentifiers: { bank_account_number: string; bank_routing_number: string; }; bankAccountOpenedDate?: string | undefined; documentOptions?: { bank: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; }; } | undefined; } | { version: 7; documentType: "phone-bill" | "utility-bill" | "agreements" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfile: null; documentOptions: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; }; company: { id: string; name: string; address: string; email: string | null; phone: string | null; incorporationState: string | null; incorporationDate: string | null; einMasked: string | null; bankAccountMasked: string | null; bankRoutingMasked: string | null; bankAccountNumber?: string | null | undefined; bankRoutingNumber?: string | null | undefined; }; director: { id: string; name: string; address: string; email: string | null; phone: string | null; ssnMasked: string | null; firstName?: string | undefined; lastName?: string | undefined; addressLine1?: string | null | undefined; addressLine2?: string | null | undefined; city?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; country?: string | null | undefined; } | null; periodStart: string; monthCount: number; confirmationPair?: { id: string; taxDocumentId: string; confirmationDocumentId: string; } | undefined; }; id: string; type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; template_id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`; template_name: string; company_id: string | null; director_id: string | null; company_name: string; director_name: string | null; owner_id: string; created_by: string; created_by_label: string; status: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; stage: "ready" | "failed" | "paused" | "cancelled" | "queued" | "rendering" | "rasterizing" | "deleted"; progress: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; page_count: number | null; byte_size: number | null; sha256: string | null; seed: string; period_start: string; mode: string | null; period_end: string | null; statement_month: string | null; opening_balance_cents: number | null; closing_balance_cents: number | null; paired_document_id: string | null; statement_pair_id: string | null; orders_csv: ProcessingOrdersInfo | null; }
```


## GET /v1/domains

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string",
      "enum": [
        "domain",
        "status",
        "charged_amount",
        "purchased_at",
        "created_at",
        "updated_at"
      ]
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 120
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error",
        "reconciliation_required"
      ]
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; sort?: "created_at" | "status" | "domain" | "charged_amount" | "purchased_at" | "updated_at" | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | "reconciliation_required" | undefined; company_id?: string | undefined; store_id?: string | undefined; }
```

Validation: domainRegistryListQuerySchema


### Expected responses

HTTP 200

```ts
{data: domains[], total: number} — see resource models; store lists include related summaries
```


## DELETE /v1/domains/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/domains/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "expected_store_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "expected_store_id"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ expected_store_id: string | null; }
```

Validation: z.strictObject({ expected_store_id: z.uuid().nullable() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```


## GET /v1/domains/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
domains — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/domains/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/domains/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "company_id"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ company_id: string | null; }
```

Validation: z.strictObject({ company_id: z.uuid().nullable() })


### Expected responses

HTTP 200

```ts
domains — see resource models; company/director secret identifiers are masked; related records may be included
```


## PUT /v1/domains/:id/assignment

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/domains/:id/assignment" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_store_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "store_id",
    "expected_store_id"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ store_id: string | null; expected_store_id: string | null; }
```

Validation: z
      .strictObject({ store_id: z.uuid().nullable(), expected_store_id: z.uuid().nullable() })


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ [x: string]: unknown; }
```


## POST /v1/domains/:id/confirm-receipt

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/:id/confirm-receipt" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ [x: string]: unknown; }
```


## GET /v1/domains/:id/dns

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains/:id/dns" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 200

```ts
{ dns: { host: string; ip: string; records: { type: string; name: string; value: string; }[]; }; id: any; owner_id: any; company_id: any; store_id: any; domain: any; provider: any; status: any; error: any; order_id: any; transaction_id: any; namecheap_id: any; charged_amount: any; currency: any; privacy_enabled: any; non_real_time: any; purchased_at: any; created_at: any; updated_at: any; external_token: any; external_verified_at: any; external_target_store_id: any; external_checked_at: any; external_next_check_at: any; external_dns: any; }
```


## DELETE /v1/domains/:id/external

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/domains/:id/external" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/domains/:id/registrar-dns

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains/:id/registrar-dns" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 200

```ts
{ domain: any; managed: true; records: NamecheapDnsHost[]; } | { connected: boolean; dryRun: boolean; domain: any; managed: true; records?: never; }
```


## POST /v1/domains/:id/registrar-dns

Authentication: api-key-or-session. Rate limit: 5 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/:id/registrar-dns" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 200

```ts
{ domain: any; managed: true; records: NamecheapDnsHost[]; } | { connected: boolean; dryRun: boolean; domain: any; managed: true; records?: never; }
```


## POST /v1/domains/:id/verify

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/:id/verify" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })


### Expected responses

HTTP 200

```ts
{ checkRan: boolean; dns: { host: string; ip: string; records: { type: string; name: string; value: string; }[]; }; id: any; owner_id: any; company_id: any; store_id: any; domain: any; provider: any; status: any; error: any; order_id: any; transaction_id: any; namecheap_id: any; charged_amount: any; currency: any; privacy_enabled: any; non_real_time: any; purchased_at: any; created_at: any; updated_at: any; external_token: any; external_verified_at: any; external_target_store_id: any; external_checked_at: any; external_next_check_at: any; external_dns: any; }
```


## GET /v1/domains/available-for-store

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains/available-for-store" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 120
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "purchased",
        "dns_pending",
        "live"
      ]
    },
    "unassigned": {
      "default": "true",
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; search?: string | undefined; company_id?: string | undefined; store_id?: string | undefined; status?: "all" | "purchased" | "dns_pending" | "live" | undefined; unassigned?: "true" | "false" | undefined; }
```

Validation: availableDomainsForStoreQuerySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 500

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: { id: any; owner_id: any; company_id: any; store_id: any; domain: any; provider: any; status: any; error: any; order_id: any; transaction_id: any; namecheap_id: any; charged_amount: any; currency: any; privacy_enabled: any; non_real_time: any; purchased_at: any; created_at: any; updated_at: any; external_token: any; external_verified_at: any; external_target_store_id: any; external_checked_at: any; external_next_check_at: any; external_dns: any; company: { id: any; name: any; }[]; store: { id: any; name: any; slug: any; }[]; target_store: { id: any; name: any; slug: any; }[]; }[]; total: number; page: number; pageSize: number; }
```


## POST /v1/domains/check

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/check" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domains": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
      }
    }
  },
  "required": [
    "domains"
  ]
}
```

Input type:

```ts
{ domains: string[]; }
```

Validation: domainRegistryAvailabilitySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 502

```ts
{ provider: string; operation: string; error: string; code: string; }
```

HTTP 500

```ts
{ error: string; }
```

HTTP 200

```ts
{ checks: { available: boolean; assigned: boolean; canPurchase: boolean; description: string; domain: string; verified: boolean; price: number | null; currency: string; premium: boolean; premiumRegistrationPrice: number | null; premiumRenewalPrice: number | null; premiumRestorePrice: number | null; premiumTransferPrice: number | null; icannFee: number | null; eapFee: number | null; errorNo: string; dryRun: boolean; }[]; dryRun: boolean; }
```


## POST /v1/domains/external

Authentication: api-key-or-session. Rate limit: 15 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/external" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "minLength": 1,
      "maxLength": 253
    }
  },
  "required": [
    "domain"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ domain: string; }
```

Validation: z.strictObject({ domain: z.string().min(1).max(253) })


### Expected responses

HTTP 201

```ts
{ dns: { host: string; ip: string; records: { type: string; name: string; value: string; }[]; }; id: string; owner_id: string; domain: string; status: string; external_token: string; external_verified_at: string | null; external_target_store_id: string | null; external_next_check_at: string | null; }
```


## POST /v1/domains/external/bulk

Authentication: api-key-or-session. Rate limit: 5 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/external/bulk" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domains": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 253
      }
    }
  },
  "required": [
    "domains"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ domains: string[]; }
```

Validation: z
        .strictObject({
          domains: z.array(z.string().trim().min(1).max(253)).min(1).max(100),
        })


### Expected responses

HTTP 200

```ts
{ results: { domain: string; id?: string; error?: string; }[]; }
```


## POST /v1/domains/purchase

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/purchase" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "years": {
      "default": 1,
      "type": "number",
      "const": 1
    },
    "idempotency_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "max_total": {
      "type": "number",
      "minimum": 0,
      "multipleOf": 0.01
    }
  },
  "required": [
    "domain",
    "company_id",
    "idempotency_key",
    "max_total"
  ]
}
```

Input type:

```ts
{ idempotency_key: string; max_total: number; domain: string; company_id: string; years?: 1 | undefined; }
```

Validation: domainRegistryPurchaseSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 202

```ts
{ code: string; domain: Record<string, unknown> | null; idempotent: boolean; execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```

HTTP 409

```ts
{ code: string; error: string; domain: Record<string, unknown> | null; idempotent: boolean; execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; idempotentRequest?: boolean | undefined; }
```

HTTP 200

```ts
{ domain: Record<string, unknown> | null; idempotent: boolean; execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```


## POST /v1/domains/purchase/bulk

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/domains/purchase/bulk" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
          },
          "company_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "domain",
          "company_id"
        ]
      }
    },
    "years": {
      "default": 1,
      "type": "number",
      "const": 1
    },
    "idempotency_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "max_total": {
      "type": "number",
      "minimum": 0,
      "multipleOf": 0.01
    }
  },
  "required": [
    "items",
    "idempotency_key",
    "max_total"
  ]
}
```

Input type:

```ts
{ idempotency_key: string; max_total: number; items: { domain: string; company_id: string; }[]; years?: 1 | undefined; }
```

Validation: domainRegistryBulkPurchaseSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 202

```ts
{ code: string; execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```

HTTP 409

```ts
{ code: string; error: string; execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; idempotentRequest?: boolean | undefined; }
```

HTTP 200

```ts
{ execution: "synchronous"; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```


## GET /v1/domains/purchases/:idempotencyKey

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/domains/purchases/:idempotencyKey" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "idempotencyKey"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 202

```ts
{ code: string; batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```

HTTP 200

```ts
{ batch_id: string; idempotency_key: string; status: "partial" | "failed" | "reconciliation_required" | "pending" | "completed"; results: RegistryPurchaseResultItem[]; stopped: boolean; estimatedTotal: number | null; currency: string | null; maxTotal: number; error: string | null; idempotentRequest?: boolean | undefined; }
```


## GET /v1/expense-profiles

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/expense-profiles" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "business",
        "personal"
      ]
    },
    "search": {
      "type": "string",
      "maxLength": 120
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  }
}
```

Input type:

```ts
{ kind?: "business" | "personal" | undefined; search?: string | undefined; page?: unknown; pageSize?: unknown; }
```

Validation: expenseQuery


### Expected responses

HTTP 200

```ts
{ data: { id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }[]; total: number; }
```


## POST /v1/expense-profiles

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/expense-profiles" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "kind": {
      "type": "string",
      "enum": [
        "business",
        "personal"
      ]
    },
    "rows": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "type": {
            "type": "string",
            "enum": [
              "ACH Credit",
              "ACH Debit",
              "Wire",
              "Card Expense",
              "Card subscription",
              "Card Credit"
            ]
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "minAmountCents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000000
          },
          "maxAmountCents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000000
          },
          "weight": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "mandatory": {
            "type": "boolean"
          },
          "frequency": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "max": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "days",
                      "week",
                      "month"
                    ]
                  }
                },
                "required": [
                  "min",
                  "max",
                  "unit"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "days",
                      "week",
                      "month"
                    ]
                  }
                },
                "required": [
                  "count",
                  "unit"
                ],
                "additionalProperties": false
              }
            ]
          },
          "billingDay": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          }
        },
        "required": [
          "name",
          "label",
          "type",
          "category",
          "maxAmountCents",
          "weight"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "name",
    "kind",
    "rows"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; }
```

Validation: expenseProfileV3Schema


### Expected responses

HTTP 201

```ts
{ id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }
```


## DELETE /v1/expense-profiles/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/expense-profiles/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/expense-profiles/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/expense-profiles/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }
```


## PATCH /v1/expense-profiles/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/expense-profiles/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "kind": {
      "type": "string",
      "enum": [
        "business",
        "personal"
      ]
    },
    "rows": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "type": {
            "type": "string",
            "enum": [
              "ACH Credit",
              "ACH Debit",
              "Wire",
              "Card Expense",
              "Card subscription",
              "Card Credit"
            ]
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "minAmountCents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000000
          },
          "maxAmountCents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000000
          },
          "weight": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "mandatory": {
            "type": "boolean"
          },
          "frequency": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "max": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "days",
                      "week",
                      "month"
                    ]
                  }
                },
                "required": [
                  "min",
                  "max",
                  "unit"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "days",
                      "week",
                      "month"
                    ]
                  }
                },
                "required": [
                  "count",
                  "unit"
                ],
                "additionalProperties": false
              }
            ]
          },
          "billingDay": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          }
        },
        "required": [
          "name",
          "label",
          "type",
          "category",
          "maxAmountCents",
          "weight"
        ],
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ name?: string | undefined; kind?: "business" | "personal" | undefined; rows?: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[] | undefined; }
```

Validation: expenseProfileV3UpdateSchema

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }
```


## POST /v1/expense-profiles/:id/duplicate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/expense-profiles/:id/duplicate" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 201

```ts
{ id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }
```


## GET /v1/expense-profiles/:id/export

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/expense-profiles/:id/export" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
string
```

HTTP 200

```ts
text/csv; charset=utf-8 — CSV file bytes
```


## POST /v1/expense-profiles/import

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1100000 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/expense-profiles/import" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "kind": {
      "type": "string",
      "enum": [
        "business",
        "personal"
      ]
    },
    "csv": {
      "type": "string",
      "maxLength": 1000000
    }
  },
  "required": [
    "name",
    "kind",
    "csv"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ name: string; kind: "business" | "personal"; csv: string; }
```

Validation: expenseProfileV3Schema
        .pick({ name: true, kind: true })
        .extend({ csv: z.string().max(1_000_000) })


### Expected responses

HTTP 400

```ts
{ error: string; errors: ExpenseCsvError[]; }
```

HTTP 400

```ts
{ error: string; code: string; }
```

HTTP 201

```ts
{ id: string; owner_id: string; name: string; kind: "business" | "personal"; rows: { type: "ACH Credit" | "ACH Debit" | "Wire" | "Card Expense" | "Card subscription" | "Card Credit"; weight: number; name: string; category: string; maxAmountCents: number; label: string; minAmountCents?: number | undefined; mandatory?: boolean | undefined; frequency?: { min: number; max: number; unit: "month" | "days" | "week"; } | { count: number; unit: "month" | "days" | "week"; } | undefined; billingDay?: number | undefined; }[]; is_default: boolean; readonly: boolean; created_at: string; updated_at: string; }
```


## GET /v1/flow

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 500

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: any[]; }
```


## POST /v1/flow

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/flow" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "company_ids": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "counts": {
          "type": "object",
          "properties": {
            "nutra": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "classic": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "marketplace": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "agency": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          },
          "required": [
            "nutra",
            "classic",
            "marketplace"
          ]
        },
        "approved_only": {
          "default": true,
          "type": "boolean"
        },
        "price_points": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "dry_run": {
          "default": false,
          "type": "boolean"
        },
        "generate_product_images": {
          "type": "boolean"
        },
        "max_domain_price": {
          "default": 20,
          "type": "number",
          "minimum": 1,
          "maximum": 100,
          "multipleOf": 0.01
        }
      },
      "required": [
        "company_ids",
        "counts"
      ]
    },
    "request_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "config",
    "request_key"
  ]
}
```

Input type:

```ts
{ config: { company_ids: string[]; counts: { nutra: number; classic: number; marketplace: number; agency?: number | undefined; }; approved_only?: boolean | undefined; price_points?: number[] | undefined; dry_run?: boolean | undefined; generate_product_images?: boolean | undefined; max_domain_price?: number | undefined; }; request_key: string; }
```

Validation: z
      .object({ config: newFlowConfigSchema, request_key: uuidSchema })


### Expected responses

HTTP 201

```ts
{ id: string; }
```

HTTP 400

```ts
{ error: string; }
```


## GET /v1/flow/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
flow_batches & {items: flow_items[]} — see resource models
```


## POST /v1/flow/:id/:action

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/flow/:id/:action" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "action": {
      "type": "string",
      "enum": [
        "start",
        "retry",
        "cancel",
        "replan"
      ]
    }
  },
  "required": [
    "id",
    "action"
  ]
}
```

Input type:

```ts
{ id: string; action: "cancel" | "start" | "retry" | "replan"; }
```

Validation: z
      .object({ id: uuidSchema, action: z.enum(['start', 'retry', 'cancel', 'replan']) })

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "price_points": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "number"
      }
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ price_points?: number[] | undefined; }
```

Validation: z
          .object({ price_points: flowPricePointsSchema.optional() })
          .strict()


### Expected responses

HTTP 500

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 400

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; preflight: FlowPreflight; }
```

HTTP 202

```ts
{ message?: string; id: string; action: "cancel" | "start" | "retry" | "replan"; }
```


## GET /v1/flow/:id/activity

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/:id/activity" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "after": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d{0,18})$"
    },
    "before": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,18}$"
    },
    "limit": {
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ after?: string | undefined; before?: string | undefined; limit?: unknown; }
```

Validation: activityQuerySchema


### Expected responses

HTTP 503

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ items: Omit<FlowItem, "plan">[]; worker: FlowWorkerHealth; server_time: string; events: FlowEvent[]; cursor: string; has_more: boolean; }
```


## GET /v1/flow/:id/activity.txt

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/:id/activity.txt" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: z.object({ id: z.uuid() })

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "after": {
      "default": "0",
      "type": "string",
      "pattern": "^(0|[1-9]\\d{0,18})$"
    },
    "limit": {
      "default": 200,
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "item_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "errors_only": {
      "default": "false",
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ after?: string | undefined; limit?: unknown; item_id?: string | undefined; errors_only?: "true" | "false" | undefined; }
```

Validation: z
      .object({
        after: z
          .string()
          .regex(/^(0|[1-9]\d{0,18})$/)
          .default('0'),
        limit: z.coerce.number().int().min(1).max(200).default(200),
        item_id: z.uuid().optional(),
        errors_only: z.enum(['true', 'false']).default('false'),
      })


### Expected responses

HTTP 200

```ts
string
```


## GET /v1/flow/:id/events

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/:id/events" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "after": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d{0,18})$"
    },
    "before": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,18}$"
    },
    "limit": {
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ after?: string | undefined; before?: string | undefined; limit?: unknown; }
```

Validation: activityQuerySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
text/event-stream — SSE events; reconnect using activity cursors
```


## POST /v1/flow/availability

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/flow/availability" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "approved_only": {
      "type": "boolean"
    },
    "price_points": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "number"
      }
    }
  },
  "required": [
    "approved_only",
    "price_points"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ approved_only: boolean; price_points: number[]; }
```

Validation: z
      .object({ approved_only: z.boolean(), price_points: flowPricePointsSchema })
      .strict()


### Expected responses

HTTP 200

```ts
{ available_prices: number[]; categories: { id: string; name: string; store_type: StoreType; missing_prices: number[]; }[]; complete_categories: { classic: number; nutra: number; }; }
```

HTTP 503

```ts
{ error: string; }
```


## GET /v1/flow/companies

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/companies" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ data: { id: any; name: any; country: any; }[]; }
```


## GET /v1/flow/preflight

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/flow/preflight" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "dry_run": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    },
    "generate_product_images": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ dry_run?: "true" | "false" | undefined; generate_product_images?: "true" | "false" | undefined; }
```

Validation: z
      .object({
        dry_run: z.enum(['true', 'false']).optional(),
        generate_product_images: z.enum(['true', 'false']).optional(),
      })
      .strict()


### Expected responses

HTTP 200

```ts
{ ready: boolean; checks: { name: string; ready: boolean; message: string; }[]; }
```


## GET /v1/images/search

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/images/search" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "minLength": 2
    },
    "page": {
      "default": 1,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "q"
  ]
}
```

Input type:

```ts
{ q: string; page?: unknown; }
```

Validation: querySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 200

```ts
UnsplashImage[]
```


## POST /v1/images/select

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/images/select" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "downloadLocation": {
      "type": "string",
      "format": "uri"
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "downloadLocation",
    "url"
  ]
}
```

Input type:

```ts
{ downloadLocation: string; url: string; }
```

Validation: selectSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ url: string; }
```


## POST /v1/images/upload

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. Multipart form upload.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/images/upload" -H "Authorization: Bearer $BANKPAGE_API_KEY" -F "file=@your-file"
```

### body

```json
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string",
      "format": "binary"
    }
  },
  "required": [
    "file"
  ]
}
```

Input type:

```ts
multipart/form-data; one file; maximum 10 MiB
```

Validation: See schema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 415

```ts
{ error: string; }
```

HTTP 200

```ts
{ url: string; }
```


## GET /v1/inquiries

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/inquiries" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  }
}
```

Input type:

```ts
{ store_id?: string | undefined; id?: string | undefined; }
```

Validation: z
      .object({ store_id: uuidSchema.optional(), id: uuidSchema.optional() })


### Expected responses

HTTP 200

```ts
{ data: { id: any; created_at: any; name: any; email: any; website: any; service: any; message: any; store_id: any; stores: { name: any; slug: any; }[]; }[]; }
```


## GET /v1/mass/batches

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/mass/batches" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{data: mass_batches[], total: number}
```


## POST /v1/mass/batches

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/mass/batches" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "companyIds": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "themeIds": {
      "default": "random",
      "anyOf": [
        {
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        {
          "type": "string",
          "const": "random"
        }
      ]
    },
    "categoryIds": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "categoriesPerStore": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "namePattern": {
      "type": "string",
      "minLength": 3,
      "maxLength": 120
    },
    "colorMode": {
      "type": "string",
      "enum": [
        "random",
        "palette"
      ]
    },
    "palette": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^#[0-9a-fA-F]{6}$"
      }
    },
    "descriptionTemplate": {
      "type": "string",
      "minLength": 5
    },
    "autoBuyDomains": {
      "type": "boolean",
      "const": false
    },
    "tld": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2,20}$"
      }
    }
  },
  "required": [
    "name",
    "count",
    "companyIds",
    "categoryIds",
    "namePattern",
    "colorMode",
    "descriptionTemplate",
    "autoBuyDomains"
  ]
}
```

Input type:

```ts
{ name: string; count: number; companyIds: string[]; categoryIds: string[]; namePattern: string; colorMode: "random" | "palette"; descriptionTemplate: string; autoBuyDomains: false; themeIds?: string[] | "random" | undefined; categoriesPerStore?: number | undefined; palette?: string[] | undefined; tld?: string[] | undefined; }
```

Validation: massBatchSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 202

```ts
{ batchId: string; }
```


## GET /v1/mass/batches/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/mass/batches/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
mass_batches
```


## POST /v1/mass/batches/:id/retry-failed

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/mass/batches/:id/retry-failed" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 202

```ts
{ retried: number; }
```


## GET /v1/navigation-counts

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/navigation-counts" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 500

```ts
{ error: string; }
```

HTTP 200

```ts
{ stores: number | undefined; agencies: number | undefined; companies: number | undefined; directors: number | undefined; domains: number | undefined; }
```


## GET /v1/product-categories

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/product-categories" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    },
    "company_ids": {
      "description": "Stores only: comma-separated company UUIDs (up to 100). Any selected company matches; combined with all other filters.",
      "type": "string"
    },
    "store_types": {
      "description": "Stores only: comma-separated classic, nutra, marketplace or agency types. Any selected type matches, within site_kind.",
      "type": "string"
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ],
      "description": "Stores only: filter domain connection status."
    },
    "publication_status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "Stores only: ready means publish_ready=true; not_ready means generation still needs completion. Independent of enabled status and domain connectivity."
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "active",
        "inactive"
      ]
    },
    "categoryId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    },
    "approved": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; company_ids?: string | undefined; store_types?: string | undefined; domain_status?: "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | undefined; publication_status?: "ready" | "not_ready" | undefined; page?: unknown; pageSize?: unknown; sort?: string | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "active" | "inactive" | undefined; categoryId?: string | undefined; scope?: "all" | "shared" | "custom" | undefined; approved?: "all" | "true" | "false" | undefined; }
```

Validation: listQuerySchema


### Expected responses

HTTP 200

```ts
{data: product_categories[], total: number} — see resource models; store lists include related summaries
```


## POST /v1/product-categories

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/product-categories" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "approved": {
      "type": "boolean"
    },
    "store_type": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "theme": {
      "type": "string",
      "enum": [
        "electronics",
        "sport",
        "fashion",
        "home",
        "beauty",
        "nutra",
        "toys",
        "pets",
        "garden",
        "tools",
        "other"
      ]
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "parent_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "status",
    "name",
    "theme",
    "slug",
    "parent_id"
  ]
}
```

Input type:

```ts
unknown
```

Validation: config.schema


### Expected responses

HTTP 201

```ts
product_categories — see resource models; company/director secret identifiers are masked; related records may be included
```


## DELETE /v1/product-categories/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/product-categories/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/product-categories/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/product-categories/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
product_categories — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/product-categories/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/product-categories/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "approved": {
      "type": "boolean"
    },
    "store_type": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "theme": {
      "type": "string",
      "enum": [
        "electronics",
        "sport",
        "fashion",
        "home",
        "beauty",
        "nutra",
        "toys",
        "pets",
        "garden",
        "tools",
        "other"
      ]
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "parent_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

Input type:

```ts
unknown
```

Validation: config.updateSchema


### Expected responses

HTTP 200

```ts
product_categories — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/product-categories/:id/status

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/product-categories/:id/status" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

Input type:

```ts
{ status: "active" | "inactive"; }
```

Validation: statusUpdateSchema


### Expected responses

HTTP 200

```ts
product_categories
```


## GET /v1/product-categories/tree

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/product-categories/tree" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    }
  }
}
```

Input type:

```ts
{ scope?: "all" | "shared" | "custom" | undefined; }
```

Validation: scopeSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: { path: string; depth: number; direct_product_count: number; product_count: number; id: string; name: string; parent_id: string | null; slug: string; theme: string; products?: { count?: number; }[]; is_shared?: boolean; }[]; }
```

HTTP 500

```ts
{ error: string; }
```


## GET /v1/products

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/products" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    },
    "company_ids": {
      "description": "Stores only: comma-separated company UUIDs (up to 100). Any selected company matches; combined with all other filters.",
      "type": "string"
    },
    "store_types": {
      "description": "Stores only: comma-separated classic, nutra, marketplace or agency types. Any selected type matches, within site_kind.",
      "type": "string"
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ],
      "description": "Stores only: filter domain connection status."
    },
    "publication_status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "Stores only: ready means publish_ready=true; not_ready means generation still needs completion. Independent of enabled status and domain connectivity."
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "active",
        "inactive"
      ]
    },
    "categoryId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    },
    "approved": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; company_ids?: string | undefined; store_types?: string | undefined; domain_status?: "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | undefined; publication_status?: "ready" | "not_ready" | undefined; page?: unknown; pageSize?: unknown; sort?: string | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "active" | "inactive" | undefined; categoryId?: string | undefined; scope?: "all" | "shared" | "custom" | undefined; approved?: "all" | "true" | "false" | undefined; }
```

Validation: listQuerySchema


### Expected responses

HTTP 200

```ts
{data: products[], total: number} — see resource models; store lists include related summaries
```


## POST /v1/products

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/products" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 200,
      "pattern": "^[a-z0-9-]+$"
    },
    "description": {
      "type": "string",
      "minLength": 10
    },
    "price_before": {
      "type": "number",
      "minimum": 0
    },
    "price_after": {
      "type": "number",
      "minimum": 0
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": "string",
            "minLength": 1
          },
          "source": {
            "type": "string",
            "enum": [
              "upload",
              "unsplash",
              "fal"
            ]
          },
          "unsplash_id": {
            "type": "string"
          },
          "attribution": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "link": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "name",
              "link"
            ]
          }
        },
        "required": [
          "url",
          "alt",
          "source"
        ]
      }
    },
    "variations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "options": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "name",
          "options"
        ]
      }
    },
    "additional_info": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "label",
          "value"
        ]
      }
    },
    "sort_order": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "approved": {
      "type": "boolean"
    }
  },
  "required": [
    "status",
    "category_id",
    "name",
    "slug",
    "description",
    "price_before",
    "price_after",
    "images",
    "variations",
    "additional_info",
    "sort_order"
  ]
}
```

Input type:

```ts
unknown
```

Validation: config.schema


### Expected responses

HTTP 201

```ts
products — see resource models; company/director secret identifiers are masked; related records may be included
```


## DELETE /v1/products/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/products/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/products/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/products/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
products — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/products/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/products/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 200,
      "pattern": "^[a-z0-9-]+$"
    },
    "description": {
      "type": "string",
      "minLength": 10
    },
    "price_before": {
      "type": "number",
      "minimum": 0
    },
    "price_after": {
      "type": "number",
      "minimum": 0
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": "string",
            "minLength": 1
          },
          "source": {
            "type": "string",
            "enum": [
              "upload",
              "unsplash",
              "fal"
            ]
          },
          "unsplash_id": {
            "type": "string"
          },
          "attribution": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "link": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "name",
              "link"
            ]
          }
        },
        "required": [
          "url",
          "alt",
          "source"
        ]
      }
    },
    "variations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "options": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "name",
          "options"
        ]
      }
    },
    "additional_info": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "label",
          "value"
        ]
      }
    },
    "sort_order": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "approved": {
      "type": "boolean"
    }
  }
}
```

Input type:

```ts
unknown
```

Validation: config.updateSchema


### Expected responses

HTTP 200

```ts
products — see resource models; company/director secret identifiers are masked; related records may be included
```


## POST /v1/products/:id/auto-images

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/products/:id/auto-images" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: idSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    }
  },
  "required": [
    "count"
  ]
}
```

Input type:

```ts
{ count: number; }
```

Validation: autoSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 202

```ts
{ jobId: string; }
```


## PATCH /v1/products/:id/status

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/products/:id/status" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

Input type:

```ts
{ status: "active" | "inactive"; }
```

Validation: statusUpdateSchema


### Expected responses

HTTP 200

```ts
products
```


## GET /v1/public/api-guide

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/api-guide"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "default": "",
      "type": "string",
      "maxLength": 200
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ]
    }
  }
}
```

Input type:

```ts
{ path?: string | undefined; method?: "GET" | "DELETE" | "PATCH" | "POST" | "PUT" | undefined; }
```

Validation: filterSchema


### Expected responses

HTTP 200

```ts
{ version: string; operations: ApiOperation[]; introduction: string; uiCalls: { file: string; line: number; path: string; method: string; response: string | null; }[]; models: Record<string, string>; }
```


## GET /v1/public/api-guide.md

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/api-guide.md"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "default": "",
      "type": "string",
      "maxLength": 200
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ]
    }
  }
}
```

Input type:

```ts
{ path?: string | undefined; method?: "GET" | "DELETE" | "PATCH" | "POST" | "PUT" | undefined; }
```

Validation: filterSchema


### Expected responses

HTTP 200

```ts
never
```


## POST /v1/public/inquiries

Authentication: public. Rate limit: 8 requests per 5 minutes per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/public/inquiries" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "website": {
      "type": "string",
      "maxLength": 300
    },
    "service": {
      "type": "string",
      "maxLength": 100
    },
    "message": {
      "type": "string",
      "minLength": 10,
      "maxLength": 5000
    },
    "consent": {
      "type": "boolean",
      "const": true
    },
    "company_website": {
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "store_id",
    "name",
    "email",
    "message",
    "consent"
  ]
}
```

Input type:

```ts
{ store_id: string; name: string; email: string; message: string; consent: true; website?: string | undefined; service?: string | undefined; company_website?: string | undefined; }
```

Validation: inquirySchema


### Expected responses

HTTP 200

```ts
{ ok: boolean; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 201

```ts
{ ok: boolean; }
```


## POST /v1/public/orders

Authentication: public. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/public/orders" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "type": {
      "default": "order",
      "type": "string",
      "enum": [
        "order",
        "quote"
      ]
    },
    "customer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2
        },
        "email": {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "phone": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "minLength": 5
        },
        "city": {
          "type": "string",
          "minLength": 2
        },
        "state": {
          "type": "string",
          "minLength": 2
        },
        "postal_code": {
          "type": "string",
          "pattern": "^\\d{5}(?:-\\d{4})?$"
        },
        "country": {
          "type": "string",
          "const": "US"
        },
        "billing_address": {
          "type": "string",
          "minLength": 5
        },
        "billing_city": {
          "type": "string",
          "minLength": 2
        },
        "billing_state": {
          "type": "string",
          "minLength": 2
        },
        "billing_postal_code": {
          "type": "string",
          "pattern": "^\\d{5}(?:-\\d{4})?$"
        },
        "billing_country": {
          "type": "string",
          "const": "US"
        }
      },
      "required": [
        "name",
        "email",
        "address",
        "city",
        "state",
        "postal_code",
        "country"
      ]
    },
    "items": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "unit_price": {
            "type": "number",
            "minimum": 0
          },
          "variation": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "product_id",
          "name",
          "quantity",
          "unit_price"
        ]
      }
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "payment_token": {
      "type": "string",
      "minLength": 10
    },
    "legal_accepted": {
      "type": "boolean",
      "const": true
    },
    "preview": {
      "type": "boolean",
      "const": false
    }
  },
  "required": [
    "store_id",
    "customer",
    "items",
    "currency",
    "legal_accepted"
  ]
}
```

Input type:

```ts
{ store_id: string; customer: { name: string; email: string; address: string; city: string; state: string; postal_code: string; country: "US"; phone?: string | undefined; billing_address?: string | undefined; billing_city?: string | undefined; billing_state?: string | undefined; billing_postal_code?: string | undefined; billing_country?: "US" | undefined; }; items: { product_id: string; name: string; quantity: number; unit_price: number; variation?: Record<string, string> | undefined; }[]; currency: string; legal_accepted: true; type?: "order" | "quote" | undefined; payment_token?: string | undefined; preview?: false | undefined; }
```

Validation: orderSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 500

```ts
{ error: string; }
```

HTTP 402

```ts
{ error: string; }
```

HTTP 201

```ts
{ order: { id: any; created_at: any; }; message: string; }
```


## POST /v1/public/register

Authentication: public. Rate limit: 5 requests per 15 minutes per IP; JSON body limit: 8192 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/public/register" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]{2,39}$"
    },
    "email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "telegram_handle": {
      "type": "string"
    },
    "password": {
      "type": "string",
      "minLength": 12,
      "maxLength": 128
    },
    "confirmPassword": {
      "type": "string"
    }
  },
  "required": [
    "username",
    "email",
    "telegram_handle",
    "password",
    "confirmPassword"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ username: string; email: string; telegram_handle: string; password: string; confirmPassword: string; }
```

Validation: registration


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```

HTTP 201

```ts
{ created: boolean; }
```


## GET /v1/public/store

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/store"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "host": {
      "type": "string",
      "minLength": 1
    },
    "store": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "catalog": {
      "type": "string",
      "const": "paged"
    }
  },
  "required": [
    "host"
  ]
}
```

Input type:

```ts
{ host: string; store?: string | undefined; catalog?: "paged" | undefined; }
```

Validation: resolveSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ company: { name: any; company_type: any; incorporation_date: any; address_line1: any; address_line2: any; city: any; state: any; postal_code: any; country: any; owner_name: any; phone: any; email: any; support_hours: any; commerce_policy: any; fulfillment_return_facility_name: any; fulfillment_address_line1: any; fulfillment_address_line2: any; fulfillment_city: any; fulfillment_state: any; fulfillment_postal_code: any; fulfillment_country: any; }; theme: { key: "classic-marketplace" | "modern-marketplace"; template_key: "classic-marketplace" | "modern-marketplace"; name: string; component_config: { font: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display"; cartIcon: "cart" | "bag" | "basket" | "tote" | "package" | "briefcase" | "cart-round" | "cart-flat" | "bag-round" | "bag-square" | "basket-wide" | "basket-round" | "tote-long" | "parcel" | "cart-compact"; borderWidth: "0px" | "1px" | "2px" | "3px" | "4px"; borderRadius: "0px" | "6px" | "12px" | "20px" | "32px"; maxWidth: "1000px" | "1040px" | "1080px" | "1120px" | "1160px" | "1200px"; variants: { topbar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; header: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigation: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigationCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; searchBar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; megaMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; mobileMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; breadcrumbs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; hero: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trendingNow: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; bestsellers: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newArrivals: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; ourPicks: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productGrid: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; shopByCategory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; aboutStory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; faq: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; salesPoints: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newsletter: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productCard: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; collectionPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; imageGallery: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; buyBox: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productTabs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; relatedProducts: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; addToCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; paymentBadges: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; supportBadge: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; quantitySelector: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartDrawer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; checkoutPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; contactPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; legalPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trackingPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; emptyState: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; footer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyServices: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyProcess: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyCta: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; }; headingFont?: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display" | undefined; designVersion?: 2 | undefined; familyId?: "marketplace-department-atlas" | "marketplace-crossroads" | "marketplace-catalog-ledger" | "marketplace-city-kiosk" | "marketplace-gallery-market" | "marketplace-market-dispatch" | "marketplace-essentials-bar" | "marketplace-catalog-chapters" | "marketplace-curators-desk" | "marketplace-department-shelves" | "marketplace-find-and-browse" | "marketplace-index-wall" | "marketplace-store-window" | "marketplace-market-commons" | "marketplace-field-supply" | "classic-fitted-workshop" | "classic-specialist-counter" | "classic-transit-journal" | "classic-field-expedition" | "classic-signal-shop" | "classic-everyday-almanac" | "classic-product-laboratory" | "classic-playroom" | "classic-object-salon" | "classic-daily-demonstration" | "classic-soft-collection" | "classic-pantry-notes" | "classic-coastal-edition" | "classic-makers-folio" | "classic-product-manual" | "nutra-label-shelf" | "nutra-clear-routine" | "nutra-botanical-folio" | "nutra-ingredient-lens" | "nutra-active-field" | "nutra-daily-cabinet" | "nutra-information-library" | "nutra-ritual-chapters" | "nutra-pantry-routine" | "nutra-format-studio" | "nutra-plain-label" | "nutra-botanical-notebook" | "nutra-open-formula" | "nutra-countertop-story" | "nutra-quiet-sequence" | "agency-signal-editorial" | "agency-process-studio" | "agency-workspace-chronicle" | "agency-open-office" | "agency-service-portals" | "agency-human-practice" | "agency-clear-partnership" | "agency-graphic-practice" | "agency-portfolio-index" | "agency-company-dossier" | "agency-service-directory" | "agency-poster-studio" | "agency-workshop-notes" | "agency-split-perspective" | "agency-conversation-first" | undefined; }; }; component_config: { variants: { topbar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; header: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigation: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigationCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; searchBar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; megaMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; mobileMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; breadcrumbs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; hero: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trendingNow: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; bestsellers: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newArrivals: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; ourPicks: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productGrid: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; shopByCategory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; aboutStory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; faq: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; salesPoints: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newsletter: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productCard: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; collectionPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; imageGallery: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; buyBox: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productTabs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; relatedProducts: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; addToCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; paymentBadges: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; supportBadge: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; quantitySelector: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartDrawer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; checkoutPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; contactPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; legalPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trackingPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; emptyState: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; footer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyServices: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyProcess: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyCta: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; }; font: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display"; cartIcon: "cart" | "bag" | "basket" | "tote" | "package" | "briefcase" | "cart-round" | "cart-flat" | "bag-round" | "bag-square" | "basket-wide" | "basket-round" | "tote-long" | "parcel" | "cart-compact"; borderWidth: "0px" | "1px" | "2px" | "3px" | "4px"; borderRadius: "0px" | "6px" | "12px" | "20px" | "32px"; maxWidth: "1000px" | "1040px" | "1080px" | "1120px" | "1160px" | "1200px"; headingFont?: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display" | undefined; designVersion?: 2 | undefined; familyId?: "marketplace-department-atlas" | "marketplace-crossroads" | "marketplace-catalog-ledger" | "marketplace-city-kiosk" | "marketplace-gallery-market" | "marketplace-market-dispatch" | "marketplace-essentials-bar" | "marketplace-catalog-chapters" | "marketplace-curators-desk" | "marketplace-department-shelves" | "marketplace-find-and-browse" | "marketplace-index-wall" | "marketplace-store-window" | "marketplace-market-commons" | "marketplace-field-supply" | "classic-fitted-workshop" | "classic-specialist-counter" | "classic-transit-journal" | "classic-field-expedition" | "classic-signal-shop" | "classic-everyday-almanac" | "classic-product-laboratory" | "classic-playroom" | "classic-object-salon" | "classic-daily-demonstration" | "classic-soft-collection" | "classic-pantry-notes" | "classic-coastal-edition" | "classic-makers-folio" | "classic-product-manual" | "nutra-label-shelf" | "nutra-clear-routine" | "nutra-botanical-folio" | "nutra-ingredient-lens" | "nutra-active-field" | "nutra-daily-cabinet" | "nutra-information-library" | "nutra-ritual-chapters" | "nutra-pantry-routine" | "nutra-format-studio" | "nutra-plain-label" | "nutra-botanical-notebook" | "nutra-open-formula" | "nutra-countertop-story" | "nutra-quiet-sequence" | "agency-signal-editorial" | "agency-process-studio" | "agency-workspace-chronicle" | "agency-open-office" | "agency-service-portals" | "agency-human-practice" | "agency-clear-partnership" | "agency-graphic-practice" | "agency-portfolio-index" | "agency-company-dossier" | "agency-service-directory" | "agency-poster-studio" | "agency-workshop-notes" | "agency-split-perspective" | "agency-conversation-first" | undefined; }; preview: boolean; categories: { products: ({ currency: unknown; } | { currency: unknown; images: any[]; additional_info: ProductFact[]; catalog_summary: boolean; description?: unknown; variations?: unknown; })[]; product_count?: number; name: string | undefined; parent_id: unknown; }[]; content?: Record<string, unknown>; content_document?: { schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; sections: { id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; slots: { [k: string]: unknown; }; }[]; }; catalog_mode?: string; catalog_total?: number; commerce_policy: { [x: string]: unknown; } | null; }
```


## GET /v1/public/store/:slug/products

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/store/:slug/products"
```

### params

```json
{
  "type": "object",
  "properties": {
    "slug": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    }
  },
  "required": [
    "slug"
  ]
}
```

Input type:

```ts
string
```

Validation: slugSchema

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "q": {
      "type": "string",
      "maxLength": 200
    },
    "remote": {
      "type": "boolean"
    },
    "view": {
      "type": "string",
      "const": "ingredients"
    },
    "page": {
      "default": 1,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  }
}
```

Input type:

```ts
{ category?: string | undefined; q?: string | undefined; remote?: unknown; view?: "ingredients" | undefined; page?: unknown; }
```

Validation: productsQuery


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ data: never[]; total: number; }
```

HTTP 200

```ts
{ total: number; data: { id: unknown; category_id: unknown; name: unknown; slug: unknown; price_before: unknown; price_after: unknown; catalog_summary: boolean; description: unknown; additional_info: unknown; variations: never[]; images: never[]; currency: any; }[]; }
```

HTTP 200

```ts
{ total: number; data: { currency: any; }[]; }
```

HTTP 200

```ts
{ data: { currency: any; }[]; total: number; }
```


## GET /v1/public/store/:slug/products/:productSlug

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/store/:slug/products/:productSlug"
```

### params

```json
{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "productSlug": {
      "type": "string"
    }
  },
  "required": [
    "slug",
    "productSlug"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ currency: any; }
```


## GET /v1/public/store/design

Authentication: public. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/public/store/design"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "host": {
      "type": "string",
      "minLength": 1
    },
    "store": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "catalog": {
      "type": "string",
      "const": "paged"
    }
  },
  "required": [
    "host"
  ]
}
```

Input type:

```ts
{ host: string; store?: string | undefined; catalog?: "paged" | undefined; }
```

Validation: resolveSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ id: unknown; primary_color: unknown; design_dna: unknown; design_review_styles: unknown; component_config: { variants: { topbar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; header: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigation: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; navigationCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; searchBar: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; megaMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; mobileMenu: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; breadcrumbs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; hero: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trendingNow: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; bestsellers: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newArrivals: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; ourPicks: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productGrid: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; shopByCategory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; aboutStory: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; faq: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; salesPoints: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; newsletter: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productCard: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; collectionPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; imageGallery: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; buyBox: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; productTabs: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; relatedProducts: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; addToCart: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; paymentBadges: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; supportBadge: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; quantitySelector: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; cartDrawer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; checkoutPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; contactPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; legalPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; trackingPage: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; emptyState: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; footer: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyServices: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyProcess: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; agencyCta: 1 | 10 | 2 | 12 | 5 | 7 | 3 | 11 | 6 | 4 | 9 | 15 | 8 | 13 | 14; }; font: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display"; cartIcon: "cart" | "bag" | "basket" | "tote" | "package" | "briefcase" | "cart-round" | "cart-flat" | "bag-round" | "bag-square" | "basket-wide" | "basket-round" | "tote-long" | "parcel" | "cart-compact"; borderWidth: "0px" | "1px" | "2px" | "3px" | "4px"; borderRadius: "0px" | "6px" | "12px" | "20px" | "32px"; maxWidth: "1000px" | "1040px" | "1080px" | "1120px" | "1160px" | "1200px"; headingFont?: "Inter" | "Poppins" | "DM Sans" | "Manrope" | "Archivo" | "Outfit" | "Space Grotesk" | "Sora" | "Plus Jakarta Sans" | "Barlow" | "Libre Franklin" | "Source Sans 3" | "Fraunces" | "Nunito Sans" | "Playfair Display" | "Source Serif 4" | "Syne" | "DM Serif Display" | undefined; designVersion?: 2 | undefined; familyId?: "marketplace-department-atlas" | "marketplace-crossroads" | "marketplace-catalog-ledger" | "marketplace-city-kiosk" | "marketplace-gallery-market" | "marketplace-market-dispatch" | "marketplace-essentials-bar" | "marketplace-catalog-chapters" | "marketplace-curators-desk" | "marketplace-department-shelves" | "marketplace-find-and-browse" | "marketplace-index-wall" | "marketplace-store-window" | "marketplace-market-commons" | "marketplace-field-supply" | "classic-fitted-workshop" | "classic-specialist-counter" | "classic-transit-journal" | "classic-field-expedition" | "classic-signal-shop" | "classic-everyday-almanac" | "classic-product-laboratory" | "classic-playroom" | "classic-object-salon" | "classic-daily-demonstration" | "classic-soft-collection" | "classic-pantry-notes" | "classic-coastal-edition" | "classic-makers-folio" | "classic-product-manual" | "nutra-label-shelf" | "nutra-clear-routine" | "nutra-botanical-folio" | "nutra-ingredient-lens" | "nutra-active-field" | "nutra-daily-cabinet" | "nutra-information-library" | "nutra-ritual-chapters" | "nutra-pantry-routine" | "nutra-format-studio" | "nutra-plain-label" | "nutra-botanical-notebook" | "nutra-open-formula" | "nutra-countertop-story" | "nutra-quiet-sequence" | "agency-signal-editorial" | "agency-process-studio" | "agency-workspace-chronicle" | "agency-open-office" | "agency-service-portals" | "agency-human-practice" | "agency-clear-partnership" | "agency-graphic-practice" | "agency-portfolio-index" | "agency-company-dossier" | "agency-service-directory" | "agency-poster-studio" | "agency-workshop-notes" | "agency-split-perspective" | "agency-conversation-first" | undefined; }; }
```


## POST /v1/public/subscriptions

Authentication: public. Rate limit: 8 requests per 5 minutes per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/public/subscriptions" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "consent": {
      "type": "boolean",
      "const": true
    },
    "company_website": {
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "store_id",
    "email",
    "consent"
  ]
}
```

Input type:

```ts
{ store_id: string; email: string; consent: true; company_website?: string | undefined; }
```

Validation: subscriptionSchema


### Expected responses

HTTP 200

```ts
{ ok: boolean; }
```

HTTP 404

```ts
{ error: string; }
```


## GET /v1/search

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/search" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "kind": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "templates",
        "users",
        "companies",
        "directors",
        "websites",
        "domains",
        "products",
        "categories",
        "expenses",
        "documents",
        "inquiries",
        "flow",
        "mass"
      ]
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    }
  },
  "required": [
    "q"
  ]
}
```

Input type:

```ts
{ q: string; kind?: "all" | "companies" | "directors" | "documents" | "domains" | "products" | "templates" | "users" | "websites" | "categories" | "expenses" | "inquiries" | "flow" | "mass" | undefined; page?: unknown; }
```

Validation: querySchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 403

```ts
{ error: string; }
```

HTTP 200

```ts
{ groups: { kind: string; data: unknown[]; total: number; unavailable: boolean; hint?: string; }[]; page: number; pageSize: number; }
```


## GET /v1/settings/integrations

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/settings/integrations" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ [k: string]: { provider: "namecheap"; credentials_configured: boolean; testable: boolean; configured: boolean; api_key_configured: boolean; api_key: string; api_user: string; username: string; client_ip: string; sandbox: string | boolean; dry_run: string | boolean; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "unsplash"; configured: boolean; application_id: string; api_key: string; secret_key: string; secret_configured: boolean; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "openai"; configured: boolean; api_key: string; text_model: string; text_reasoning: string; agent_model: string; agent_reasoning: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "fal"; configured: boolean; api_key: string; image_model: string; image_edit_model: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; model?: never; } | { provider: "anthropic"; configured: boolean; api_key: string; model: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; }; }
```


## DELETE /v1/settings/integrations/:provider

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/settings/integrations/:provider" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "provider": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "enum": [
        "namecheap",
        "unsplash",
        "anthropic",
        "openai",
        "fal"
      ]
    }
  },
  "required": [
    "provider"
  ]
}
```

Input type:

```ts
"unsplash" | "fal" | "namecheap" | "anthropic" | "openai"
```

Validation: providerSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```


## PUT /v1/settings/integrations/:provider

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/settings/integrations/:provider" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "provider": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "enum": [
        "namecheap",
        "unsplash",
        "anthropic",
        "openai",
        "fal"
      ]
    }
  },
  "required": [
    "provider"
  ]
}
```

Input type:

```ts
"unsplash" | "fal" | "namecheap" | "anthropic" | "openai"
```

Validation: providerSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "api_user": {
          "type": "string",
          "minLength": 1
        },
        "api_key": {
          "type": "string",
          "minLength": 1
        },
        "username": {
          "type": "string",
          "minLength": 1
        },
        "client_ip": {
          "anyOf": [
            {
              "type": "string",
              "format": "ipv4",
              "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        "sandbox": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        }
      },
      "required": [
        "api_user",
        "username",
        "client_ip",
        "sandbox",
        "dry_run"
      ]
    },
    {
      "type": "object",
      "properties": {
        "application_id": {
          "type": "string",
          "minLength": 1
        },
        "api_key": {
          "type": "string",
          "minLength": 1
        },
        "secret_key": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "application_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "api_key": {
          "type": "string",
          "minLength": 1
        },
        "model": {
          "type": "string"
        }
      }
    }
  ]
}
```

Input type:

```ts
{ api_user: string; username: string; client_ip: string; sandbox: boolean; dry_run: boolean; api_key?: string | undefined; } | { application_id: unknown; api_key?: string | undefined; secret_key?: string | undefined; } | { api_key?: string | undefined; model?: string | undefined; } | { api_key?: string | undefined; image_model?: string | undefined; image_edit_model?: string | undefined; }
```

Validation: schema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ provider: "namecheap"; credentials_configured: boolean; testable: boolean; configured: boolean; api_key_configured: boolean; api_key: string; api_user: string; username: string; client_ip: string; sandbox: string | boolean; dry_run: string | boolean; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "unsplash"; configured: boolean; application_id: string; api_key: string; secret_key: string; secret_configured: boolean; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "openai"; configured: boolean; api_key: string; text_model: string; text_reasoning: string; agent_model: string; agent_reasoning: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; image_model?: never; image_edit_model?: never; model?: never; } | { provider: "fal"; configured: boolean; api_key: string; image_model: string; image_edit_model: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; model?: never; } | { provider: "anthropic"; configured: boolean; api_key: string; model: string; credentials_configured?: never; testable?: never; api_key_configured?: never; api_user?: never; username?: never; client_ip?: never; sandbox?: never; dry_run?: never; application_id?: never; secret_key?: never; secret_configured?: never; text_model?: never; text_reasoning?: never; agent_model?: never; agent_reasoning?: never; image_model?: never; image_edit_model?: never; }
```


## POST /v1/settings/integrations/:provider/test

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/settings/integrations/:provider/test" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "provider": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "enum": [
        "namecheap",
        "unsplash",
        "anthropic",
        "openai"
      ]
    }
  },
  "required": [
    "provider"
  ]
}
```

Input type:

```ts
"unsplash" | "namecheap" | "anthropic" | "openai"
```

Validation: testableProviderSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ provider: "namecheap"; ok: boolean; message: string; diagnostic: NamecheapReadOnlyDiagnostic; }
```

HTTP 200

```ts
{ provider: "unsplash" | "anthropic" | "openai"; ok: boolean; message: string; }
```

HTTP 502

```ts
{ observed_client_ip?: string; provider: string; ok: boolean; operation: string; error: string; code: string; }
```

HTTP 502

```ts
{ provider: "unsplash" | "namecheap" | "anthropic" | "openai"; ok: boolean; error: string; }
```


## GET /v1/settings/platform

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/settings/platform" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ render: { configured: boolean; api_key: string; service_id: string; ip_address: string; storefront_host: string; }; nmi: { security_key_configured: boolean; api_url: string; }; jobs_enabled: boolean; jobs_mode: JobMode; node_env: "test" | "development" | "production"; admin_url: string; supabase_url: string; }
```


## POST /v1/settings/platform/render/test

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/settings/platform/render/test" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ ok: boolean; message: string; domains: { name: string; verificationStatus: string; }[]; }
```

HTTP 502

```ts
{ ok: boolean; error: string; }
```


## GET /v1/shopify-connections

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/shopify-connections" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ data: { id: any; shop_id: any; shop_domain: any; shop_name: any; currency: any; timezone: any; is_development: any; created_at: any; }[]; }
```


## POST /v1/shopify-connections

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-connections" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "shop_domain": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.myshopify\\.com$"
        },
        "auth_method": {
          "type": "string",
          "const": "client_credentials"
        },
        "client_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^\\S+$"
        },
        "client_secret": {
          "type": "string",
          "minLength": 10,
          "maxLength": 4096,
          "pattern": "^\\S+$"
        }
      },
      "required": [
        "shop_domain",
        "auth_method",
        "client_id",
        "client_secret"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "shop_domain": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.myshopify\\.com$"
        },
        "auth_method": {
          "type": "string",
          "const": "access_token"
        },
        "access_token": {
          "type": "string",
          "minLength": 10,
          "maxLength": 4096,
          "pattern": "^\\S+$"
        }
      },
      "required": [
        "shop_domain",
        "access_token"
      ],
      "additionalProperties": false
    }
  ]
}
```

Input type:

```ts
{ shop_domain: string; auth_method: "client_credentials"; client_id: string; client_secret: string; } | { shop_domain: string; access_token: string; auth_method?: "access_token" | undefined; }
```

Validation: connectionInputSchema


### Expected responses

HTTP 200

```ts
{ id: string; shop_id: string; shop_domain: string; shop_name: string; currency: string; timezone: string; is_development: boolean; created_at: string; }
```


## DELETE /v1/shopify-connections/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/shopify-connections/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 204

```ts
No response body
```


## POST /v1/shopify-connections/test

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-connections/test" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "shop_domain": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.myshopify\\.com$"
        },
        "auth_method": {
          "type": "string",
          "const": "client_credentials"
        },
        "client_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^\\S+$"
        },
        "client_secret": {
          "type": "string",
          "minLength": 10,
          "maxLength": 4096,
          "pattern": "^\\S+$"
        }
      },
      "required": [
        "shop_domain",
        "auth_method",
        "client_id",
        "client_secret"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "shop_domain": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.myshopify\\.com$"
        },
        "auth_method": {
          "type": "string",
          "const": "access_token"
        },
        "access_token": {
          "type": "string",
          "minLength": 10,
          "maxLength": 4096,
          "pattern": "^\\S+$"
        }
      },
      "required": [
        "shop_domain",
        "access_token"
      ],
      "additionalProperties": false
    }
  ]
}
```

Input type:

```ts
{ shop_domain: string; auth_method: "client_credentials"; client_id: string; client_secret: string; } | { shop_domain: string; access_token: string; auth_method?: "access_token" | undefined; }
```

Validation: connectionInputSchema


### Expected responses

HTTP 200

```ts
Omit<ShopifyConnection, "id" | "created_at"> & { scopes: string[]; checked_at: string; }
```


## GET /v1/shopify-imports

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/shopify-imports" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; }
```

Validation: pageSchema


### Expected responses

HTTP 200

```ts
{ data: { id: any; connection_id: any; shop_domain: any; filename: any; filenames: any; status: any; total_rows: any; imported_rows: any; skipped_rows: any; failed_rows: any; uncertain_rows: any; undo_total_rows: any; undone_rows: any; undo_failed_rows: any; undo_requested_at: any; gross_amount: any; currency: any; date_from: any; date_to: any; error: any; created_at: any; updated_at: any; }[]; total: number; }
```


## POST /v1/shopify-imports

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 1048576 bytes. Multipart form upload.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports" -H "Authorization: Bearer $BANKPAGE_API_KEY" -F "file=@your-file"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "connection_id"
  ]
}
```

Input type:

```ts
{ connection_id: string; }
```

Validation: z.object({ connection_id: z.uuid() })

### body

```json
{
  "type": "object",
  "properties": {
    "files": {
      "type": "array",
      "minItems": 1,
      "maxItems": 64,
      "items": {
        "type": "string",
        "format": "binary"
      }
    }
  },
  "required": [
    "files"
  ]
}
```

Input type:

```ts
multipart/form-data; fields file, files or files[]; 1–64 CSV files; combined maximum 64 MiB
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ import: ShopifyImport; duplicate: boolean; }
```


## GET /v1/shopify-imports/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/shopify-imports/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "status": {
      "type": "string",
      "enum": [
        "failed",
        "uncertain",
        "undo_failed"
      ]
    },
    "month": {
      "type": "string",
      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
    }
  }
}
```

Input type:

```ts
{ page?: unknown; pageSize?: unknown; status?: "failed" | "uncertain" | "undo_failed" | undefined; month?: string | undefined; }
```

Validation: pageSchema
        .extend({
          status: z.enum(['failed', 'uncertain', 'undo_failed']).optional(),
          month: z
            .string()
            .regex(/^(?!0000)\d{4}-(0[1-9]|1[0-2])$/)
            .optional(),
        })

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ months: ShopifyImportMonth[]; rows: ShopifyImportRow[]; total: number; import: ShopifyImport; }
```


## POST /v1/shopify-imports/:id/cancel

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/:id/cancel" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; connection_id: string; shop_domain: string; filename: string; filenames: string[]; status: ShopifyImportStatus; total_rows: number; imported_rows: number; skipped_rows: number; failed_rows: number; uncertain_rows: number; undo_total_rows: number; undone_rows: number; undo_failed_rows: number; undo_requested_at: string | null; gross_amount: string; currency: string | null; date_from: string | null; date_to: string | null; error: string | null; created_at: string; updated_at: string; }
```


## POST /v1/shopify-imports/:id/retry

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/:id/retry" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; connection_id: string; shop_domain: string; filename: string; filenames: string[]; status: ShopifyImportStatus; total_rows: number; imported_rows: number; skipped_rows: number; failed_rows: number; uncertain_rows: number; undo_total_rows: number; undone_rows: number; undo_failed_rows: number; undo_requested_at: string | null; gross_amount: string; currency: string | null; date_from: string | null; date_to: string | null; error: string | null; created_at: string; updated_at: string; }
```


## POST /v1/shopify-imports/:id/start

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/:id/start" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; connection_id: string; shop_domain: string; filename: string; filenames: string[]; status: ShopifyImportStatus; total_rows: number; imported_rows: number; skipped_rows: number; failed_rows: number; uncertain_rows: number; undo_total_rows: number; undone_rows: number; undo_failed_rows: number; undo_requested_at: string | null; gross_amount: string; currency: string | null; date_from: string | null; date_to: string | null; error: string | null; created_at: string; updated_at: string; }
```


## POST /v1/shopify-imports/:id/undo

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/:id/undo" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 200

```ts
{ id: string; connection_id: string; shop_domain: string; filename: string; filenames: string[]; status: ShopifyImportStatus; total_rows: number; imported_rows: number; skipped_rows: number; failed_rows: number; uncertain_rows: number; undo_total_rows: number; undone_rows: number; undo_failed_rows: number; undo_requested_at: string | null; gross_amount: string; currency: string | null; date_from: string | null; date_to: string | null; error: string | null; created_at: string; updated_at: string; }
```


## POST /v1/shopify-imports/generation/download

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 32768 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/generation/download" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "period": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "one_month"
                    },
                    "month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "multi_month"
                    },
                    "from_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    },
                    "to_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "from_month",
                    "to_month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "custom"
                    },
                    "start_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    },
                    "end_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    }
                  },
                  "required": [
                    "mode",
                    "start_date",
                    "end_date"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "generation_mode": {
              "type": "string",
              "const": "automatic"
            },
            "total_volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            }
          },
          "required": [
            "period",
            "generation_mode",
            "total_volume",
            "aov",
            "min_amount",
            "max_amount"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "period": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "one_month"
                    },
                    "month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "multi_month"
                    },
                    "from_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    },
                    "to_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "from_month",
                    "to_month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "custom"
                    },
                    "start_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    },
                    "end_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    }
                  },
                  "required": [
                    "mode",
                    "start_date",
                    "end_date"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "generation_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_sales": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "gross_amount": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
                  },
                  "order_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "month",
                  "gross_amount",
                  "order_count"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "period",
            "generation_mode",
            "monthly_sales"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "default": "amount",
              "type": "string",
              "const": "amount"
            },
            "volume_mode": {
              "type": "string",
              "const": "auto"
            },
            "total_volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_mode",
            "total_volume"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "default": "amount",
              "type": "string",
              "const": "amount"
            },
            "volume_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_volumes": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "gross_amount": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
                  }
                },
                "required": [
                  "month",
                  "gross_amount"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_mode",
            "monthly_volumes"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "type": "string",
              "const": "orders"
            },
            "volume_mode": {
              "type": "string",
              "const": "auto"
            },
            "total_orders": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_basis",
            "volume_mode",
            "total_orders"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "type": "string",
              "const": "orders"
            },
            "volume_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_orders": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "order_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "month",
                  "order_count"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_basis",
            "volume_mode",
            "monthly_orders"
          ],
          "additionalProperties": false
        }
      ]
    }
  ]
}
```

Input type:

```ts
ShopifyOrderGenerationInput
```

Validation: shopifyOrderGenerationInputSchema (planShopifyOrders)


### Expected responses

HTTP 400

```ts
{ error: string; code: string; }
```

HTTP 200

```ts
Readable
```

HTTP 200

```ts
text/csv; charset=utf-8 — CSV file bytes
```


## POST /v1/shopify-imports/generation/preview

Authentication: api-key-or-session. Rate limit: 10 requests per 1 minute per IP; JSON body limit: 32768 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/shopify-imports/generation/preview" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "period": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "one_month"
                    },
                    "month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "multi_month"
                    },
                    "from_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    },
                    "to_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "from_month",
                    "to_month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "custom"
                    },
                    "start_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    },
                    "end_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    }
                  },
                  "required": [
                    "mode",
                    "start_date",
                    "end_date"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "generation_mode": {
              "type": "string",
              "const": "automatic"
            },
            "total_volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            }
          },
          "required": [
            "period",
            "generation_mode",
            "total_volume",
            "aov",
            "min_amount",
            "max_amount"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "period": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "one_month"
                    },
                    "month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "multi_month"
                    },
                    "from_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    },
                    "to_month": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                    }
                  },
                  "required": [
                    "mode",
                    "from_month",
                    "to_month"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "const": "custom"
                    },
                    "start_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    },
                    "end_date": {
                      "type": "string",
                      "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
                    }
                  },
                  "required": [
                    "mode",
                    "start_date",
                    "end_date"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "generation_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_sales": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "gross_amount": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
                  },
                  "order_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "month",
                  "gross_amount",
                  "order_count"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "period",
            "generation_mode",
            "monthly_sales"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "default": "amount",
              "type": "string",
              "const": "amount"
            },
            "volume_mode": {
              "type": "string",
              "const": "auto"
            },
            "total_volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_mode",
            "total_volume"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "default": "amount",
              "type": "string",
              "const": "amount"
            },
            "volume_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_volumes": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "gross_amount": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
                  }
                },
                "required": [
                  "month",
                  "gross_amount"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_mode",
            "monthly_volumes"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "type": "string",
              "const": "orders"
            },
            "volume_mode": {
              "type": "string",
              "const": "auto"
            },
            "total_orders": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_basis",
            "volume_mode",
            "total_orders"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "from_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "to_month": {
              "type": "string",
              "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
            },
            "aov": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "min_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "max_amount": {
              "type": "string",
              "pattern": "^(?:0|[1-9]\\d{0,13})\\.\\d{2}$"
            },
            "seed": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "as_of": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "volume_basis": {
              "type": "string",
              "const": "orders"
            },
            "volume_mode": {
              "type": "string",
              "const": "manual"
            },
            "monthly_orders": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^(?!0000)\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "order_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "month",
                  "order_count"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "from_month",
            "to_month",
            "aov",
            "min_amount",
            "max_amount",
            "volume_basis",
            "volume_mode",
            "monthly_orders"
          ],
          "additionalProperties": false
        }
      ]
    }
  ]
}
```

Input type:

```ts
ShopifyOrderGenerationInput
```

Validation: shopifyOrderGenerationInputSchema (planShopifyOrders)


### Expected responses

HTTP 200

```ts
{ config: ShopifyOrderGenerationConfig; total_rows: number; gross_amount: string; aov: string; currency: "USD"; date_from: string; date_to: string; months: ShopifyOrderGenerationMonth[]; rows: ShopifyOrderInput[]; }
```


## GET /v1/store-configuration/options

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/store-configuration/options" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ fonts: readonly ["Inter", "Poppins", "DM Sans", "Manrope", "Archivo", "Outfit", "Space Grotesk", "Sora", "Plus Jakarta Sans", "Barlow", "Libre Franklin", "Source Sans 3", "Fraunces", "Nunito Sans", "Playfair Display", "Source Serif 4", "Syne", "DM Serif Display"]; variants: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; cartIcons: readonly ["cart", "bag", "basket", "tote", "package", "briefcase", "cart-round", "cart-flat", "bag-round", "bag-square", "basket-wide", "basket-round", "tote-long", "parcel", "cart-compact"]; components: ComponentCatalogItem[]; componentGroups: readonly ["Global shell", "Homepage", "Product discovery", "Product detail", "Commerce pages", "Content pages"]; store: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{ status: z.ZodEnum<{ active: "active"; inactive: "inactive"; }>; store_type: z.ZodOptional<z.ZodEnum<{ agency: "agency"; nutra: "nutra"; classic: "classic"; marketplace: "marketplace"; }>>; theme_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{ font: z.ZodEnum<{ Inter: "Inter"; Poppins: "Poppins"; "DM Sans": "DM Sans"; Manrope: "Manrope"; Archivo: "Archivo"; Outfit: "Outfit"; "Space Grotesk": "Space Grotesk"; Sora: "Sora"; "Plus Jakarta Sans": "Plus Jakarta Sans"; Barlow: "Barlow"; "Libre Franklin": "Libre Franklin"; "Source Sans 3": "Source Sans 3"; Fraunces: "Fraunces"; "Nunito Sans": "Nunito Sans"; "Playfair Display": "Playfair Display"; "Source Serif 4": "Source Serif 4"; Syne: "Syne"; "DM Serif Display": "DM Serif Display"; }>; headingFont: z.ZodOptional<z.ZodEnum<{ Inter: "Inter"; Poppins: "Poppins"; "DM Sans": "DM Sans"; Manrope: "Manrope"; Archivo: "Archivo"; Outfit: "Outfit"; "Space Grotesk": "Space Grotesk"; Sora: "Sora"; "Plus Jakarta Sans": "Plus Jakarta Sans"; Barlow: "Barlow"; "Libre Franklin": "Libre Franklin"; "Source Sans 3": "Source Sans 3"; Fraunces: "Fraunces"; "Nunito Sans": "Nunito Sans"; "Playfair Display": "Playfair Display"; "Source Serif 4": "Source Serif 4"; Syne: "Syne"; "DM Serif Display": "DM Serif Display"; }>>; designVersion: z.ZodOptional<z.ZodLiteral<2>>; familyId: z.ZodOptional<z.ZodEnum<{ "marketplace-department-atlas": "marketplace-department-atlas"; "marketplace-crossroads": "marketplace-crossroads"; "marketplace-catalog-ledger": "marketplace-catalog-ledger"; "marketplace-city-kiosk": "marketplace-city-kiosk"; "marketplace-gallery-market": "marketplace-gallery-market"; "marketplace-market-dispatch": "marketplace-market-dispatch"; "marketplace-essentials-bar": "marketplace-essentials-bar"; "marketplace-catalog-chapters": "marketplace-catalog-chapters"; "marketplace-curators-desk": "marketplace-curators-desk"; "marketplace-department-shelves": "marketplace-department-shelves"; "marketplace-find-and-browse": "marketplace-find-and-browse"; "marketplace-index-wall": "marketplace-index-wall"; "marketplace-store-window": "marketplace-store-window"; "marketplace-market-commons": "marketplace-market-commons"; "marketplace-field-supply": "marketplace-field-supply"; "classic-fitted-workshop": "classic-fitted-workshop"; "classic-specialist-counter": "classic-specialist-counter"; "classic-transit-journal": "classic-transit-journal"; "classic-field-expedition": "classic-field-expedition"; "classic-signal-shop": "classic-signal-shop"; "classic-everyday-almanac": "classic-everyday-almanac"; "classic-product-laboratory": "classic-product-laboratory"; "classic-playroom": "classic-playroom"; "classic-object-salon": "classic-object-salon"; "classic-daily-demonstration": "classic-daily-demonstration"; "classic-soft-collection": "classic-soft-collection"; "classic-pantry-notes": "classic-pantry-notes"; "classic-coastal-edition": "classic-coastal-edition"; "classic-makers-folio": "classic-makers-folio"; "classic-product-manual": "classic-product-manual"; "nutra-label-shelf": "nutra-label-shelf"; "nutra-clear-routine": "nutra-clear-routine"; "nutra-botanical-folio": "nutra-botanical-folio"; "nutra-ingredient-lens": "nutra-ingredient-lens"; "nutra-active-field": "nutra-active-field"; "nutra-daily-cabinet": "nutra-daily-cabinet"; "nutra-information-library": "nutra-information-library"; "nutra-ritual-chapters": "nutra-ritual-chapters"; "nutra-pantry-routine": "nutra-pantry-routine"; "nutra-format-studio": "nutra-format-studio"; "nutra-plain-label": "nutra-plain-label"; "nutra-botanical-notebook": "nutra-botanical-notebook"; "nutra-open-formula": "nutra-open-formula"; "nutra-countertop-story": "nutra-countertop-story"; "nutra-quiet-sequence": "nutra-quiet-sequence"; "agency-signal-editorial": "agency-signal-editorial"; "agency-process-studio": "agency-process-studio"; "agency-workspace-chronicle": "agency-workspace-chronicle"; "agency-open-office": "agency-open-office"; "agency-service-portals": "agency-service-portals"; "agency-human-practice": "agency-human-practice"; "agency-clear-partnership": "agency-clear-partnership"; "agency-graphic-practice": "agency-graphic-practice"; "agency-portfolio-index": "agency-portfolio-index"; "agency-company-dossier": "agency-company-dossier"; "agency-service-directory": "agency-service-directory"; "agency-poster-studio": "agency-poster-studio"; "agency-workshop-notes": "agency-workshop-notes"; "agency-split-perspective": "agency-split-perspective"; "agency-conversation-first": "agency-conversation-first"; }>>; cartIcon: z.ZodEnum<{ cart: "cart"; bag: "bag"; basket: "basket"; tote: "tote"; package: "package"; briefcase: "briefcase"; "cart-round": "cart-round"; "cart-flat": "cart-flat"; "bag-round": "bag-round"; "bag-square": "bag-square"; "basket-wide": "basket-wide"; "basket-round": "basket-round"; "tote-long": "tote-long"; parcel: "parcel"; "cart-compact": "cart-compact"; }>; borderWidth: z.ZodEnum<{ "0px": "0px"; "1px": "1px"; "2px": "2px"; "3px": "3px"; "4px": "4px"; }>; borderRadius: z.ZodEnum<{ "0px": "0px"; "6px": "6px"; "12px": "12px"; "20px": "20px"; "32px": "32px"; }>; maxWidth: z.ZodEnum<{ "1000px": "1000px"; "1040px": "1040px"; "1080px": "1080px"; "1120px": "1120px"; "1160px": "1160px"; "1200px": "1200px"; }>; variants: z.ZodObject<{ topbar: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; header: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; navigation: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; navigationCart: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; searchBar: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; megaMenu: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; mobileMenu: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; breadcrumbs: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; hero: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; trendingNow: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; bestsellers: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; newArrivals: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; ourPicks: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; productGrid: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; shopByCategory: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; aboutStory: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; faq: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; salesPoints: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; newsletter: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; productCard: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; collectionPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; productPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; imageGallery: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; buyBox: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; productTabs: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; relatedProducts: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; addToCart: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; paymentBadges: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; supportBadge: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; quantitySelector: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; cartPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; cartDrawer: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; checkoutPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; contactPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; legalPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; trackingPage: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; emptyState: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; footer: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; agencyServices: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; agencyProcess: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; agencyCta: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>, z.ZodLiteral<9>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<15>]>; }, z.core.$strict>; }, z.core.$strict>>>; nmi_tokenization_key: z.ZodOptional<z.ZodNullable<z.ZodString>>; company_id: z.ZodUUID; theme_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>; storefront_template: z.ZodOptional<z.ZodEnum<{ "classic-marketplace": "classic-marketplace"; "modern-marketplace": "modern-marketplace"; }>>; design_dna: z.ZodOptional<z.ZodNullable<z.ZodType<DesignDNA, DesignDNA, z.core.$ZodTypeInternals<DesignDNA, DesignDNA>>>>; generation_settings: z.ZodOptional<z.ZodObject<{ textProvider: z.ZodEnum<{ anthropic: "anthropic"; openai: "openai"; }>; imageProvider: z.ZodEnum<{ unsplash: "unsplash"; fal: "fal"; }>; generateLogo: z.ZodBoolean; generateFavicon: z.ZodBoolean; reviewDesign: z.ZodBoolean; }, z.core.$strict>>; layout_config: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{ id: z.ZodString; family: z.ZodOptional<z.ZodEnum<{ topbar: "topbar"; header: "header"; navigation: "navigation"; navigationCart: "navigationCart"; searchBar: "searchBar"; megaMenu: "megaMenu"; mobileMenu: "mobileMenu"; breadcrumbs: "breadcrumbs"; hero: "hero"; trendingNow: "trendingNow"; bestsellers: "bestsellers"; newArrivals: "newArrivals"; ourPicks: "ourPicks"; productGrid: "productGrid"; shopByCategory: "shopByCategory"; aboutStory: "aboutStory"; faq: "faq"; salesPoints: "salesPoints"; newsletter: "newsletter"; productCard: "productCard"; collectionPage: "collectionPage"; productPage: "productPage"; imageGallery: "imageGallery"; buyBox: "buyBox"; productTabs: "productTabs"; relatedProducts: "relatedProducts"; addToCart: "addToCart"; paymentBadges: "paymentBadges"; supportBadge: "supportBadge"; quantitySelector: "quantitySelector"; cartPage: "cartPage"; cartDrawer: "cartDrawer"; checkoutPage: "checkoutPage"; contactPage: "contactPage"; legalPage: "legalPage"; trackingPage: "trackingPage"; emptyState: "emptyState"; footer: "footer"; agencyServices: "agencyServices"; agencyProcess: "agencyProcess"; agencyCta: "agencyCta"; }>>; enabled: z.ZodBoolean; }, z.core.$strict>>>>; name: z.ZodString; slug: z.ZodString; domain: z.ZodNullable<z.ZodString>; primary_color: z.ZodString; currency: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; payment_methods: z.ZodArray<z.ZodEnum<{ visa: "visa"; mastercard: "mastercard"; }>>; description: z.ZodString; logo_url: z.ZodNullable<z.ZodURL>; favicon_url: z.ZodOptional<z.ZodNullable<z.ZodURL>>; support_email: z.ZodNullable<z.ZodEmail>; support_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>; support_hours: z.ZodOptional<z.ZodNullable<z.ZodString>>; commerce_policy: z.ZodOptional<z.ZodNullable<z.ZodObject<{ product_purchase_options: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{ variations: z.ZodArray<z.ZodObject<{ name: z.ZodString; options: z.ZodArray<z.ZodString>; }, z.core.$strip>>; size_confirmation_required: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>>>; shipping_carrier: z.ZodOptional<z.ZodString>; processing_days: z.ZodOptional<z.ZodNumber>; shipping_min_days: z.ZodOptional<z.ZodNumber>; shipping_max_days: z.ZodOptional<z.ZodNumber>; refund_processing_days: z.ZodOptional<z.ZodNumber>; refund_credit_min_days: z.ZodOptional<z.ZodNumber>; refund_credit_max_days: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>>; use_company_return_facility: z.ZodOptional<z.ZodBoolean>; descriptor: z.ZodString; return_facility_name: z.ZodString; return_address_line1: z.ZodString; return_address_line2: z.ZodNullable<z.ZodString>; return_city: z.ZodString; return_state: z.ZodString; return_postal_code: z.ZodString; return_country: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>; content: z.ZodObject<{ hero_image: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; story_image: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; category_banner_image: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; newsletter_image: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; contact_image: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; hero_eyebrow: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; hero_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; hero_body: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; hero_cta: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; trending_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; bestsellers_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; new_arrivals_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; our_picks_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; product_grid_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; categories_eyebrow: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; categories_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; story_eyebrow: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; story_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; story_body: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; story_link: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_shipping_question: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_shipping: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_returns_question: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_returns: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_support_question: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; faq_support: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; newsletter_eyebrow: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; newsletter_title: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; newsletter_body: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; newsletter_button: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>; }, z.core.$catchall<z.ZodUnknown>>; legal_updated_at: z.ZodISODate; nmi_username: z.ZodOptional<z.ZodNullable<z.ZodString>>; nmi_password: z.ZodOptional<z.ZodNullable<z.ZodString>>; domain_status: z.ZodEnum<{ error: "error"; none: "none"; pending_purchase: "pending_purchase"; purchased: "purchased"; dns_pending: "dns_pending"; live: "live"; }>; domain_error: z.ZodNullable<z.ZodString>; category_ids: z.ZodArray<z.ZodUUID>; price_points: z.ZodArray<z.ZodNumber>; products_per_category: z.ZodNumber; product_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>; domain_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>; expected_current_domain_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>; }, z.core.$strip>>; generation: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{ textProvider: z.ZodEnum<{ anthropic: "anthropic"; openai: "openai"; }>; imageProvider: z.ZodEnum<{ unsplash: "unsplash"; fal: "fal"; }>; generateLogo: z.ZodBoolean; generateFavicon: z.ZodBoolean; reviewDesign: z.ZodBoolean; }, z.core.$strict>>; }
```


## GET /v1/stores

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    },
    "company_ids": {
      "description": "Stores only: comma-separated company UUIDs (up to 100). Any selected company matches; combined with all other filters.",
      "type": "string"
    },
    "store_types": {
      "description": "Stores only: comma-separated classic, nutra, marketplace or agency types. Any selected type matches, within site_kind.",
      "type": "string"
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ],
      "description": "Stores only: filter domain connection status."
    },
    "publication_status": {
      "type": "string",
      "enum": [
        "ready",
        "not_ready"
      ],
      "description": "Stores only: ready means publish_ready=true; not_ready means generation still needs completion. Independent of enabled status and domain connectivity."
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "pageSize": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "sort": {
      "default": "created_at",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "search": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "active",
        "inactive"
      ]
    },
    "categoryId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "scope": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "shared",
        "custom"
      ]
    },
    "approved": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "true",
        "false"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; company_ids?: string | undefined; store_types?: string | undefined; domain_status?: "error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live" | undefined; publication_status?: "ready" | "not_ready" | undefined; page?: unknown; pageSize?: unknown; sort?: string | undefined; order?: "desc" | "asc" | undefined; search?: string | undefined; status?: "all" | "active" | "inactive" | undefined; categoryId?: string | undefined; scope?: "all" | "shared" | "custom" | undefined; approved?: "all" | "true" | "false" | undefined; }
```

Validation: listQuerySchema


### Expected responses

HTTP 200

```ts
{data: stores[], total: number} — see resource models; store lists include related summaries
```


## POST /v1/stores

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "store_type": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace",
        "agency"
      ]
    },
    "theme_config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "font": {
              "type": "string",
              "enum": [
                "Inter",
                "Poppins",
                "DM Sans",
                "Manrope",
                "Archivo",
                "Outfit",
                "Space Grotesk",
                "Sora",
                "Plus Jakarta Sans",
                "Barlow",
                "Libre Franklin",
                "Source Sans 3",
                "Fraunces",
                "Nunito Sans",
                "Playfair Display",
                "Source Serif 4",
                "Syne",
                "DM Serif Display"
              ]
            },
            "headingFont": {
              "type": "string",
              "enum": [
                "Inter",
                "Poppins",
                "DM Sans",
                "Manrope",
                "Archivo",
                "Outfit",
                "Space Grotesk",
                "Sora",
                "Plus Jakarta Sans",
                "Barlow",
                "Libre Franklin",
                "Source Sans 3",
                "Fraunces",
                "Nunito Sans",
                "Playfair Display",
                "Source Serif 4",
                "Syne",
                "DM Serif Display"
              ]
            },
            "designVersion": {
              "type": "number",
              "const": 2
            },
            "familyId": {
              "type": "string",
              "enum": [
                "marketplace-department-atlas",
                "marketplace-crossroads",
                "marketplace-catalog-ledger",
                "marketplace-city-kiosk",
                "marketplace-gallery-market",
                "marketplace-market-dispatch",
                "marketplace-essentials-bar",
                "marketplace-catalog-chapters",
                "marketplace-curators-desk",
                "marketplace-department-shelves",
                "marketplace-find-and-browse",
                "marketplace-index-wall",
                "marketplace-store-window",
                "marketplace-market-commons",
                "marketplace-field-supply",
                "classic-fitted-workshop",
                "classic-specialist-counter",
                "classic-transit-journal",
                "classic-field-expedition",
                "classic-signal-shop",
                "classic-everyday-almanac",
                "classic-product-laboratory",
                "classic-playroom",
                "classic-object-salon",
                "classic-daily-demonstration",
                "classic-soft-collection",
                "classic-pantry-notes",
                "classic-coastal-edition",
                "classic-makers-folio",
                "classic-product-manual",
                "nutra-label-shelf",
                "nutra-clear-routine",
                "nutra-botanical-folio",
                "nutra-ingredient-lens",
                "nutra-active-field",
                "nutra-daily-cabinet",
                "nutra-information-library",
                "nutra-ritual-chapters",
                "nutra-pantry-routine",
                "nutra-format-studio",
                "nutra-plain-label",
                "nutra-botanical-notebook",
                "nutra-open-formula",
                "nutra-countertop-story",
                "nutra-quiet-sequence",
                "agency-signal-editorial",
                "agency-process-studio",
                "agency-workspace-chronicle",
                "agency-open-office",
                "agency-service-portals",
                "agency-human-practice",
                "agency-clear-partnership",
                "agency-graphic-practice",
                "agency-portfolio-index",
                "agency-company-dossier",
                "agency-service-directory",
                "agency-poster-studio",
                "agency-workshop-notes",
                "agency-split-perspective",
                "agency-conversation-first"
              ]
            },
            "cartIcon": {
              "type": "string",
              "enum": [
                "cart",
                "bag",
                "basket",
                "tote",
                "package",
                "briefcase",
                "cart-round",
                "cart-flat",
                "bag-round",
                "bag-square",
                "basket-wide",
                "basket-round",
                "tote-long",
                "parcel",
                "cart-compact"
              ]
            },
            "borderWidth": {
              "type": "string",
              "enum": [
                "0px",
                "1px",
                "2px",
                "3px",
                "4px"
              ]
            },
            "borderRadius": {
              "type": "string",
              "enum": [
                "0px",
                "6px",
                "12px",
                "20px",
                "32px"
              ]
            },
            "maxWidth": {
              "type": "string",
              "enum": [
                "1000px",
                "1040px",
                "1080px",
                "1120px",
                "1160px",
                "1200px"
              ]
            },
            "variants": {
              "type": "object",
              "properties": {
                "topbar": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "header": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "navigation": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "navigationCart": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "searchBar": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "megaMenu": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "mobileMenu": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "breadcrumbs": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "hero": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "trendingNow": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "bestsellers": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "newArrivals": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "ourPicks": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productGrid": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "shopByCategory": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "aboutStory": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "faq": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "salesPoints": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "newsletter": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productCard": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "collectionPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "imageGallery": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "buyBox": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productTabs": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "relatedProducts": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "addToCart": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "paymentBadges": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "supportBadge": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "quantitySelector": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "cartPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "cartDrawer": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "checkoutPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "contactPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "legalPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "trackingPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "emptyState": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "footer": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyServices": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyProcess": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyCta": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                }
              },
              "required": [
                "topbar",
                "header",
                "navigation",
                "navigationCart",
                "searchBar",
                "megaMenu",
                "mobileMenu",
                "breadcrumbs",
                "hero",
                "trendingNow",
                "bestsellers",
                "newArrivals",
                "ourPicks",
                "productGrid",
                "shopByCategory",
                "aboutStory",
                "faq",
                "salesPoints",
                "newsletter",
                "productCard",
                "collectionPage",
                "productPage",
                "imageGallery",
                "buyBox",
                "productTabs",
                "relatedProducts",
                "addToCart",
                "paymentBadges",
                "supportBadge",
                "quantitySelector",
                "cartPage",
                "cartDrawer",
                "checkoutPage",
                "contactPage",
                "legalPage",
                "trackingPage",
                "emptyState",
                "footer",
                "agencyServices",
                "agencyProcess",
                "agencyCta"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "font",
            "cartIcon",
            "borderWidth",
            "borderRadius",
            "maxWidth",
            "variants"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "nmi_tokenization_key": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "theme_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "storefront_template": {
      "type": "string",
      "enum": [
        "classic-marketplace",
        "modern-marketplace"
      ]
    },
    "design_dna": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "sectionColorMode": {
              "type": "string",
              "enum": [
                "light",
                "dark",
                "primal",
                "primal-more"
              ]
            },
            "sectionBackgrounds": {
              "minItems": 2,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$"
              }
            },
            "sectionBackdrops": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "opacity": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 0.3
                },
                "sections": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "aboutStory",
                      "faq",
                      "ourPicks",
                      "newsletter"
                    ]
                  }
                }
              },
              "required": [
                "enabled",
                "opacity",
                "sections"
              ]
            },
            "seed": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "revision": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "palette": {
              "type": "object",
              "properties": {
                "primary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "secondary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "accent": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "background": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "surface": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "text": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "muted": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "border": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onPrimary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onAccent": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "footer": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onFooter": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                }
              },
              "required": [
                "primary",
                "secondary",
                "accent",
                "background",
                "surface",
                "text",
                "muted",
                "border",
                "onPrimary",
                "onAccent",
                "footer",
                "onFooter"
              ]
            },
            "typography": {
              "type": "object",
              "properties": {
                "heading": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9 -]+$"
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9 -]+$"
                },
                "ratio": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 2
                },
                "weight": {
                  "type": "number",
                  "minimum": 100,
                  "maximum": 1000
                },
                "tracking": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "case": {
                  "type": "string",
                  "enum": [
                    "none",
                    "uppercase"
                  ]
                }
              },
              "required": [
                "heading",
                "body",
                "ratio",
                "weight",
                "tracking",
                "case"
              ]
            },
            "shape": {
              "type": "object",
              "properties": {
                "radius": {
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?(px|rem)$"
                },
                "shadow": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "border": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "radii": {
                  "type": "object",
                  "properties": {
                    "sm": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "md": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "lg": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "full": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    }
                  },
                  "required": [
                    "sm",
                    "md",
                    "lg",
                    "full"
                  ]
                }
              },
              "required": [
                "radius",
                "shadow",
                "border"
              ]
            },
            "spacing": {
              "type": "object",
              "properties": {
                "container": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "gutter": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "section": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "unit": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                }
              },
              "required": [
                "container",
                "gutter",
                "section",
                "unit"
              ]
            },
            "motion": {
              "type": "object",
              "properties": {
                "personality": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "duration": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5000
                },
                "ease": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "effects": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "background",
                      "hover",
                      "reveal",
                      "parallax"
                    ]
                  }
                }
              },
              "required": [
                "personality",
                "duration",
                "ease",
                "effects"
              ]
            },
            "decoration": {
              "type": "object",
              "properties": {
                "pattern": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "separator": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "background": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "layout": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "pattern",
                "separator",
                "background",
                "layout"
              ]
            },
            "variants": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": 1,
                "maximum": 15
              }
            },
            "layoutOrder": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "version",
            "seed",
            "revision",
            "palette",
            "typography",
            "shape",
            "spacing",
            "motion",
            "decoration",
            "variants",
            "layoutOrder"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "generation_settings": {
      "type": "object",
      "properties": {
        "textProvider": {
          "type": "string",
          "enum": [
            "openai",
            "anthropic"
          ]
        },
        "imageProvider": {
          "type": "string",
          "enum": [
            "fal",
            "unsplash"
          ]
        },
        "generateLogo": {
          "type": "boolean"
        },
        "generateFavicon": {
          "type": "boolean"
        },
        "reviewDesign": {
          "type": "boolean"
        }
      },
      "required": [
        "textProvider",
        "imageProvider",
        "generateLogo",
        "generateFavicon",
        "reviewDesign"
      ],
      "additionalProperties": false
    },
    "layout_config": {
      "anyOf": [
        {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "family": {
                "type": "string",
                "enum": [
                  "topbar",
                  "header",
                  "navigation",
                  "navigationCart",
                  "searchBar",
                  "megaMenu",
                  "mobileMenu",
                  "breadcrumbs",
                  "hero",
                  "trendingNow",
                  "bestsellers",
                  "newArrivals",
                  "ourPicks",
                  "productGrid",
                  "shopByCategory",
                  "aboutStory",
                  "faq",
                  "salesPoints",
                  "newsletter",
                  "productCard",
                  "collectionPage",
                  "productPage",
                  "imageGallery",
                  "buyBox",
                  "productTabs",
                  "relatedProducts",
                  "addToCart",
                  "paymentBadges",
                  "supportBadge",
                  "quantitySelector",
                  "cartPage",
                  "cartDrawer",
                  "checkoutPage",
                  "contactPage",
                  "legalPage",
                  "trackingPage",
                  "emptyState",
                  "footer",
                  "agencyServices",
                  "agencyProcess",
                  "agencyCta"
                ]
              },
              "enabled": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "enabled"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "domain": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "primary_color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "payment_methods": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "visa",
          "mastercard"
        ]
      }
    },
    "description": {
      "type": "string",
      "minLength": 10,
      "maxLength": 500
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "favicon_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_phone": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\+[1-9]\\d{7,14}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_hours": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "commerce_policy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "product_purchase_options": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "variations": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "name",
                        "options"
                      ]
                    }
                  },
                  "size_confirmation_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variations"
                ]
              }
            },
            "shipping_carrier": {
              "type": "string",
              "minLength": 2,
              "maxLength": 60
            },
            "processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "shipping_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "shipping_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "refund_processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "use_company_return_facility": {
      "type": "boolean"
    },
    "descriptor": {
      "type": "string",
      "maxLength": 25,
      "pattern": "^[A-Z0-9 ]*$"
    },
    "return_facility_name": {
      "type": "string",
      "maxLength": 160
    },
    "return_address_line1": {
      "type": "string",
      "maxLength": 160
    },
    "return_address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "return_city": {
      "type": "string",
      "maxLength": 100
    },
    "return_state": {
      "type": "string",
      "maxLength": 100
    },
    "return_postal_code": {
      "type": "string",
      "maxLength": 20
    },
    "return_country": {
      "type": "string",
      "maxLength": 2
    },
    "content": {
      "type": "object",
      "properties": {
        "hero_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_title": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_body": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_cta": {
          "type": "string",
          "maxLength": 1000
        },
        "trending_title": {
          "type": "string",
          "maxLength": 1000
        },
        "bestsellers_title": {
          "type": "string",
          "maxLength": 1000
        },
        "new_arrivals_title": {
          "type": "string",
          "maxLength": 1000
        },
        "our_picks_title": {
          "type": "string",
          "maxLength": 1000
        },
        "product_grid_title": {
          "type": "string",
          "maxLength": 1000
        },
        "categories_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "categories_title": {
          "type": "string",
          "maxLength": 1000
        },
        "story_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "story_title": {
          "type": "string",
          "maxLength": 1000
        },
        "story_body": {
          "type": "string",
          "maxLength": 1000
        },
        "story_link": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_title": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_shipping_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_shipping": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_returns_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_returns": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_support_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_support": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_title": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_body": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_button": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "story_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "category_banner_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "newsletter_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "contact_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        }
      },
      "additionalProperties": {}
    },
    "legal_updated_at": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "nmi_username": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "nmi_password": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 8,
          "maxLength": 240
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ]
    },
    "domain_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "category_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "price_points": {
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": 0,
        "multipleOf": 0.01
      }
    },
    "products_per_category": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "product_ids": {
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_current_domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "status",
    "company_id",
    "name",
    "slug",
    "domain",
    "primary_color",
    "currency",
    "payment_methods",
    "description",
    "logo_url",
    "support_email",
    "descriptor",
    "return_facility_name",
    "return_address_line1",
    "return_address_line2",
    "return_city",
    "return_state",
    "return_postal_code",
    "return_country",
    "content",
    "legal_updated_at",
    "domain_status",
    "domain_error",
    "category_ids",
    "price_points",
    "products_per_category"
  ]
}
```

Input type:

```ts
unknown
```

Validation: config.schema


### Expected responses

HTTP 201

```ts
stores — see resource models; company/director secret identifiers are masked; related records may be included
```


## DELETE /v1/stores/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/stores/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/stores/:id

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
stores — see resource models; company/director secret identifiers are masked; related records may be included
```


## PATCH /v1/stores/:id

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/stores/:id" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "store_type": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace",
        "agency"
      ]
    },
    "theme_config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "font": {
              "type": "string",
              "enum": [
                "Inter",
                "Poppins",
                "DM Sans",
                "Manrope",
                "Archivo",
                "Outfit",
                "Space Grotesk",
                "Sora",
                "Plus Jakarta Sans",
                "Barlow",
                "Libre Franklin",
                "Source Sans 3",
                "Fraunces",
                "Nunito Sans",
                "Playfair Display",
                "Source Serif 4",
                "Syne",
                "DM Serif Display"
              ]
            },
            "headingFont": {
              "type": "string",
              "enum": [
                "Inter",
                "Poppins",
                "DM Sans",
                "Manrope",
                "Archivo",
                "Outfit",
                "Space Grotesk",
                "Sora",
                "Plus Jakarta Sans",
                "Barlow",
                "Libre Franklin",
                "Source Sans 3",
                "Fraunces",
                "Nunito Sans",
                "Playfair Display",
                "Source Serif 4",
                "Syne",
                "DM Serif Display"
              ]
            },
            "designVersion": {
              "type": "number",
              "const": 2
            },
            "familyId": {
              "type": "string",
              "enum": [
                "marketplace-department-atlas",
                "marketplace-crossroads",
                "marketplace-catalog-ledger",
                "marketplace-city-kiosk",
                "marketplace-gallery-market",
                "marketplace-market-dispatch",
                "marketplace-essentials-bar",
                "marketplace-catalog-chapters",
                "marketplace-curators-desk",
                "marketplace-department-shelves",
                "marketplace-find-and-browse",
                "marketplace-index-wall",
                "marketplace-store-window",
                "marketplace-market-commons",
                "marketplace-field-supply",
                "classic-fitted-workshop",
                "classic-specialist-counter",
                "classic-transit-journal",
                "classic-field-expedition",
                "classic-signal-shop",
                "classic-everyday-almanac",
                "classic-product-laboratory",
                "classic-playroom",
                "classic-object-salon",
                "classic-daily-demonstration",
                "classic-soft-collection",
                "classic-pantry-notes",
                "classic-coastal-edition",
                "classic-makers-folio",
                "classic-product-manual",
                "nutra-label-shelf",
                "nutra-clear-routine",
                "nutra-botanical-folio",
                "nutra-ingredient-lens",
                "nutra-active-field",
                "nutra-daily-cabinet",
                "nutra-information-library",
                "nutra-ritual-chapters",
                "nutra-pantry-routine",
                "nutra-format-studio",
                "nutra-plain-label",
                "nutra-botanical-notebook",
                "nutra-open-formula",
                "nutra-countertop-story",
                "nutra-quiet-sequence",
                "agency-signal-editorial",
                "agency-process-studio",
                "agency-workspace-chronicle",
                "agency-open-office",
                "agency-service-portals",
                "agency-human-practice",
                "agency-clear-partnership",
                "agency-graphic-practice",
                "agency-portfolio-index",
                "agency-company-dossier",
                "agency-service-directory",
                "agency-poster-studio",
                "agency-workshop-notes",
                "agency-split-perspective",
                "agency-conversation-first"
              ]
            },
            "cartIcon": {
              "type": "string",
              "enum": [
                "cart",
                "bag",
                "basket",
                "tote",
                "package",
                "briefcase",
                "cart-round",
                "cart-flat",
                "bag-round",
                "bag-square",
                "basket-wide",
                "basket-round",
                "tote-long",
                "parcel",
                "cart-compact"
              ]
            },
            "borderWidth": {
              "type": "string",
              "enum": [
                "0px",
                "1px",
                "2px",
                "3px",
                "4px"
              ]
            },
            "borderRadius": {
              "type": "string",
              "enum": [
                "0px",
                "6px",
                "12px",
                "20px",
                "32px"
              ]
            },
            "maxWidth": {
              "type": "string",
              "enum": [
                "1000px",
                "1040px",
                "1080px",
                "1120px",
                "1160px",
                "1200px"
              ]
            },
            "variants": {
              "type": "object",
              "properties": {
                "topbar": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "header": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "navigation": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "navigationCart": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "searchBar": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "megaMenu": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "mobileMenu": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "breadcrumbs": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "hero": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "trendingNow": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "bestsellers": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "newArrivals": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "ourPicks": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productGrid": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "shopByCategory": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "aboutStory": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "faq": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "salesPoints": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "newsletter": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productCard": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "collectionPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "imageGallery": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "buyBox": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "productTabs": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "relatedProducts": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "addToCart": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "paymentBadges": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "supportBadge": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "quantitySelector": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "cartPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "cartDrawer": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "checkoutPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "contactPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "legalPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "trackingPage": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "emptyState": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "footer": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyServices": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyProcess": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                },
                "agencyCta": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    },
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 5
                    },
                    {
                      "type": "number",
                      "const": 6
                    },
                    {
                      "type": "number",
                      "const": 7
                    },
                    {
                      "type": "number",
                      "const": 8
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 10
                    },
                    {
                      "type": "number",
                      "const": 11
                    },
                    {
                      "type": "number",
                      "const": 12
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 14
                    },
                    {
                      "type": "number",
                      "const": 15
                    }
                  ]
                }
              },
              "required": [
                "topbar",
                "header",
                "navigation",
                "navigationCart",
                "searchBar",
                "megaMenu",
                "mobileMenu",
                "breadcrumbs",
                "hero",
                "trendingNow",
                "bestsellers",
                "newArrivals",
                "ourPicks",
                "productGrid",
                "shopByCategory",
                "aboutStory",
                "faq",
                "salesPoints",
                "newsletter",
                "productCard",
                "collectionPage",
                "productPage",
                "imageGallery",
                "buyBox",
                "productTabs",
                "relatedProducts",
                "addToCart",
                "paymentBadges",
                "supportBadge",
                "quantitySelector",
                "cartPage",
                "cartDrawer",
                "checkoutPage",
                "contactPage",
                "legalPage",
                "trackingPage",
                "emptyState",
                "footer",
                "agencyServices",
                "agencyProcess",
                "agencyCta"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "font",
            "cartIcon",
            "borderWidth",
            "borderRadius",
            "maxWidth",
            "variants"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "nmi_tokenization_key": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "theme_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "storefront_template": {
      "type": "string",
      "enum": [
        "classic-marketplace",
        "modern-marketplace"
      ]
    },
    "design_dna": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "sectionColorMode": {
              "type": "string",
              "enum": [
                "light",
                "dark",
                "primal",
                "primal-more"
              ]
            },
            "sectionBackgrounds": {
              "minItems": 2,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$"
              }
            },
            "sectionBackdrops": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "opacity": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 0.3
                },
                "sections": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "aboutStory",
                      "faq",
                      "ourPicks",
                      "newsletter"
                    ]
                  }
                }
              },
              "required": [
                "enabled",
                "opacity",
                "sections"
              ]
            },
            "seed": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "revision": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "palette": {
              "type": "object",
              "properties": {
                "primary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "secondary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "accent": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "background": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "surface": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "text": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "muted": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "border": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onPrimary": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onAccent": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "footer": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "onFooter": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                }
              },
              "required": [
                "primary",
                "secondary",
                "accent",
                "background",
                "surface",
                "text",
                "muted",
                "border",
                "onPrimary",
                "onAccent",
                "footer",
                "onFooter"
              ]
            },
            "typography": {
              "type": "object",
              "properties": {
                "heading": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9 -]+$"
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9 -]+$"
                },
                "ratio": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 2
                },
                "weight": {
                  "type": "number",
                  "minimum": 100,
                  "maximum": 1000
                },
                "tracking": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "case": {
                  "type": "string",
                  "enum": [
                    "none",
                    "uppercase"
                  ]
                }
              },
              "required": [
                "heading",
                "body",
                "ratio",
                "weight",
                "tracking",
                "case"
              ]
            },
            "shape": {
              "type": "object",
              "properties": {
                "radius": {
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?(px|rem)$"
                },
                "shadow": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "border": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "radii": {
                  "type": "object",
                  "properties": {
                    "sm": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "md": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "lg": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    },
                    "full": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 180,
                      "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                    }
                  },
                  "required": [
                    "sm",
                    "md",
                    "lg",
                    "full"
                  ]
                }
              },
              "required": [
                "radius",
                "shadow",
                "border"
              ]
            },
            "spacing": {
              "type": "object",
              "properties": {
                "container": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "gutter": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "section": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "unit": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                }
              },
              "required": [
                "container",
                "gutter",
                "section",
                "unit"
              ]
            },
            "motion": {
              "type": "object",
              "properties": {
                "personality": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "duration": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5000
                },
                "ease": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "pattern": "^[a-zA-Z0-9#.,%() /+*-]+$"
                },
                "effects": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "background",
                      "hover",
                      "reveal",
                      "parallax"
                    ]
                  }
                }
              },
              "required": [
                "personality",
                "duration",
                "ease",
                "effects"
              ]
            },
            "decoration": {
              "type": "object",
              "properties": {
                "pattern": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "separator": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "background": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "layout": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "pattern",
                "separator",
                "background",
                "layout"
              ]
            },
            "variants": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": 1,
                "maximum": 15
              }
            },
            "layoutOrder": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "version",
            "seed",
            "revision",
            "palette",
            "typography",
            "shape",
            "spacing",
            "motion",
            "decoration",
            "variants",
            "layoutOrder"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "generation_settings": {
      "type": "object",
      "properties": {
        "textProvider": {
          "type": "string",
          "enum": [
            "openai",
            "anthropic"
          ]
        },
        "imageProvider": {
          "type": "string",
          "enum": [
            "fal",
            "unsplash"
          ]
        },
        "generateLogo": {
          "type": "boolean"
        },
        "generateFavicon": {
          "type": "boolean"
        },
        "reviewDesign": {
          "type": "boolean"
        }
      },
      "required": [
        "textProvider",
        "imageProvider",
        "generateLogo",
        "generateFavicon",
        "reviewDesign"
      ],
      "additionalProperties": false
    },
    "layout_config": {
      "anyOf": [
        {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "family": {
                "type": "string",
                "enum": [
                  "topbar",
                  "header",
                  "navigation",
                  "navigationCart",
                  "searchBar",
                  "megaMenu",
                  "mobileMenu",
                  "breadcrumbs",
                  "hero",
                  "trendingNow",
                  "bestsellers",
                  "newArrivals",
                  "ourPicks",
                  "productGrid",
                  "shopByCategory",
                  "aboutStory",
                  "faq",
                  "salesPoints",
                  "newsletter",
                  "productCard",
                  "collectionPage",
                  "productPage",
                  "imageGallery",
                  "buyBox",
                  "productTabs",
                  "relatedProducts",
                  "addToCart",
                  "paymentBadges",
                  "supportBadge",
                  "quantitySelector",
                  "cartPage",
                  "cartDrawer",
                  "checkoutPage",
                  "contactPage",
                  "legalPage",
                  "trackingPage",
                  "emptyState",
                  "footer",
                  "agencyServices",
                  "agencyProcess",
                  "agencyCta"
                ]
              },
              "enabled": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "enabled"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "pattern": "^[a-z0-9-]+$"
    },
    "domain": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "primary_color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "payment_methods": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "visa",
          "mastercard"
        ]
      }
    },
    "description": {
      "type": "string",
      "minLength": 10,
      "maxLength": 500
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "favicon_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_phone": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\+[1-9]\\d{7,14}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "support_hours": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "commerce_policy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "product_purchase_options": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "variations": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "options": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "name",
                        "options"
                      ]
                    }
                  },
                  "size_confirmation_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variations"
                ]
              }
            },
            "shipping_carrier": {
              "type": "string",
              "minLength": 2,
              "maxLength": 60
            },
            "processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "shipping_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "shipping_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "refund_processing_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_min_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "refund_credit_max_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "use_company_return_facility": {
      "type": "boolean"
    },
    "descriptor": {
      "type": "string",
      "maxLength": 25,
      "pattern": "^[A-Z0-9 ]*$"
    },
    "return_facility_name": {
      "type": "string",
      "maxLength": 160
    },
    "return_address_line1": {
      "type": "string",
      "maxLength": 160
    },
    "return_address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "return_city": {
      "type": "string",
      "maxLength": 100
    },
    "return_state": {
      "type": "string",
      "maxLength": 100
    },
    "return_postal_code": {
      "type": "string",
      "maxLength": 20
    },
    "return_country": {
      "type": "string",
      "maxLength": 2
    },
    "content": {
      "type": "object",
      "properties": {
        "hero_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_title": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_body": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_cta": {
          "type": "string",
          "maxLength": 1000
        },
        "trending_title": {
          "type": "string",
          "maxLength": 1000
        },
        "bestsellers_title": {
          "type": "string",
          "maxLength": 1000
        },
        "new_arrivals_title": {
          "type": "string",
          "maxLength": 1000
        },
        "our_picks_title": {
          "type": "string",
          "maxLength": 1000
        },
        "product_grid_title": {
          "type": "string",
          "maxLength": 1000
        },
        "categories_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "categories_title": {
          "type": "string",
          "maxLength": 1000
        },
        "story_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "story_title": {
          "type": "string",
          "maxLength": 1000
        },
        "story_body": {
          "type": "string",
          "maxLength": 1000
        },
        "story_link": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_title": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_shipping_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_shipping": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_returns_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_returns": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_support_question": {
          "type": "string",
          "maxLength": 1000
        },
        "faq_support": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_eyebrow": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_title": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_body": {
          "type": "string",
          "maxLength": 1000
        },
        "newsletter_button": {
          "type": "string",
          "maxLength": 1000
        },
        "hero_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "story_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "category_banner_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "newsletter_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        },
        "contact_image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "unsplash",
                "fal",
                "catalog"
              ]
            },
            "unsplash_id": {
              "type": "string"
            },
            "attribution": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "link": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "link"
              ]
            }
          },
          "required": [
            "url",
            "alt",
            "source"
          ]
        }
      },
      "additionalProperties": {}
    },
    "legal_updated_at": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "nmi_username": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "nmi_password": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 8,
          "maxLength": 240
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_status": {
      "type": "string",
      "enum": [
        "none",
        "pending_purchase",
        "purchased",
        "dns_pending",
        "live",
        "error"
      ]
    },
    "domain_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "category_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "price_points": {
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": 0,
        "multipleOf": 0.01
      }
    },
    "products_per_category": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "product_ids": {
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_current_domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

Input type:

```ts
unknown
```

Validation: config.updateSchema


### Expected responses

HTTP 200

```ts
stores — see resource models; company/director secret identifiers are masked; related records may be included
```


## GET /v1/stores/:id/content-document

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/content-document" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: paramsSchema


### Expected responses

HTTP 200

```ts
{ document: { [x: string]: unknown; schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; themeVoice: string; facts: Record<string, unknown>; sections: { [x: string]: unknown; id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; enabled: boolean; slots: Record<string, { [x: string]: unknown; mode: "custom" | "inherit" | "hidden"; provenance: "manual" | "legacy" | "generated" | "fallback"; value?: unknown; generation?: Record<string, unknown> | undefined; }>; }[]; legacy: { [x: string]: unknown; raw: unknown; resolvedFallbacks: Record<string, unknown>; rendererVersion: string; themeSnapshot?: unknown; }; }; draftId: string | null; publishedId: string | null; revisions: Record<string, unknown>[]; schemaReady: boolean; legacy: { active: boolean; captureComplete: boolean; }; diagnostics: ContentDiagnostic[]; }
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## PUT /v1/stores/:id/content-document/draft

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 8388608 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/stores/:id/content-document/draft" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "expectedDraftId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "document": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "storeType": {
          "type": "string",
          "enum": [
            "classic",
            "nutra",
            "marketplace",
            "agency"
          ]
        },
        "themeVoice": {
          "type": "string",
          "maxLength": 2000
        },
        "facts": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "sections": {
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "family": {
                "type": "string",
                "enum": [
                  "topbar",
                  "header",
                  "navigation",
                  "navigationCart",
                  "searchBar",
                  "megaMenu",
                  "mobileMenu",
                  "breadcrumbs",
                  "hero",
                  "trendingNow",
                  "bestsellers",
                  "newArrivals",
                  "ourPicks",
                  "productGrid",
                  "shopByCategory",
                  "aboutStory",
                  "faq",
                  "salesPoints",
                  "newsletter",
                  "productCard",
                  "collectionPage",
                  "productPage",
                  "imageGallery",
                  "buyBox",
                  "productTabs",
                  "relatedProducts",
                  "addToCart",
                  "paymentBadges",
                  "supportBadge",
                  "quantitySelector",
                  "cartPage",
                  "cartDrawer",
                  "checkoutPage",
                  "contactPage",
                  "legalPage",
                  "trackingPage",
                  "emptyState",
                  "footer",
                  "agencyServices",
                  "agencyProcess",
                  "agencyCta"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "slots": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "custom",
                        "inherit",
                        "hidden"
                      ]
                    },
                    "value": {},
                    "provenance": {
                      "default": "manual",
                      "type": "string",
                      "enum": [
                        "legacy",
                        "manual",
                        "generated",
                        "fallback"
                      ]
                    },
                    "generation": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "mode"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "family",
              "enabled",
              "slots"
            ],
            "additionalProperties": {}
          }
        },
        "legacy": {
          "type": "object",
          "properties": {
            "raw": {},
            "resolvedFallbacks": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "rendererVersion": {
              "type": "string",
              "minLength": 1
            },
            "themeSnapshot": {}
          },
          "required": [
            "raw",
            "resolvedFallbacks",
            "rendererVersion"
          ],
          "additionalProperties": {}
        }
      },
      "required": [
        "schemaVersion",
        "storeType",
        "themeVoice",
        "sections",
        "legacy"
      ],
      "additionalProperties": {}
    }
  },
  "required": [
    "expectedDraftId",
    "document"
  ]
}
```

Input type:

```ts
{ expectedDraftId: string | null; document: { [x: string]: unknown; schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; themeVoice: string; sections: { [x: string]: unknown; id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; enabled: boolean; slots: Record<string, { [x: string]: unknown; mode: "custom" | "inherit" | "hidden"; value?: unknown; provenance?: "manual" | "legacy" | "generated" | "fallback" | undefined; generation?: Record<string, unknown> | undefined; }>; }[]; legacy: { [x: string]: unknown; raw: unknown; resolvedFallbacks: Record<string, unknown>; rendererVersion: string; themeSnapshot?: unknown; }; facts?: Record<string, unknown> | undefined; }; }
```

Validation: draftSchema

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: paramsSchema


### Expected responses

HTTP 200

```ts
{ draftId: string; document: { [x: string]: unknown; schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; themeVoice: string; facts: Record<string, unknown>; sections: { [x: string]: unknown; id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; enabled: boolean; slots: Record<string, { [x: string]: unknown; mode: "custom" | "inherit" | "hidden"; provenance: "manual" | "legacy" | "generated" | "fallback"; value?: unknown; generation?: Record<string, unknown> | undefined; }>; }[]; legacy: { [x: string]: unknown; raw: unknown; resolvedFallbacks: Record<string, unknown>; rendererVersion: string; themeSnapshot?: unknown; }; }; diagnostics: ContentDiagnostic[]; }
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## POST /v1/stores/:id/content-document/generate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 8388608 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/content-document/generate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: paramsSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "document": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "storeType": {
          "type": "string",
          "enum": [
            "classic",
            "nutra",
            "marketplace",
            "agency"
          ]
        },
        "themeVoice": {
          "type": "string",
          "maxLength": 2000
        },
        "facts": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "sections": {
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "family": {
                "type": "string",
                "enum": [
                  "topbar",
                  "header",
                  "navigation",
                  "navigationCart",
                  "searchBar",
                  "megaMenu",
                  "mobileMenu",
                  "breadcrumbs",
                  "hero",
                  "trendingNow",
                  "bestsellers",
                  "newArrivals",
                  "ourPicks",
                  "productGrid",
                  "shopByCategory",
                  "aboutStory",
                  "faq",
                  "salesPoints",
                  "newsletter",
                  "productCard",
                  "collectionPage",
                  "productPage",
                  "imageGallery",
                  "buyBox",
                  "productTabs",
                  "relatedProducts",
                  "addToCart",
                  "paymentBadges",
                  "supportBadge",
                  "quantitySelector",
                  "cartPage",
                  "cartDrawer",
                  "checkoutPage",
                  "contactPage",
                  "legalPage",
                  "trackingPage",
                  "emptyState",
                  "footer",
                  "agencyServices",
                  "agencyProcess",
                  "agencyCta"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "slots": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "custom",
                        "inherit",
                        "hidden"
                      ]
                    },
                    "value": {},
                    "provenance": {
                      "default": "manual",
                      "type": "string",
                      "enum": [
                        "legacy",
                        "manual",
                        "generated",
                        "fallback"
                      ]
                    },
                    "generation": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "mode"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "family",
              "enabled",
              "slots"
            ],
            "additionalProperties": {}
          }
        },
        "legacy": {
          "type": "object",
          "properties": {
            "raw": {},
            "resolvedFallbacks": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "rendererVersion": {
              "type": "string",
              "minLength": 1
            },
            "themeSnapshot": {}
          },
          "required": [
            "raw",
            "resolvedFallbacks",
            "rendererVersion"
          ],
          "additionalProperties": {}
        }
      },
      "required": [
        "schemaVersion",
        "storeType",
        "themeVoice",
        "sections",
        "legacy"
      ],
      "additionalProperties": {}
    },
    "sectionId": {
      "type": "string",
      "minLength": 1
    },
    "slotId": {
      "type": "string",
      "minLength": 1
    },
    "provider": {
      "type": "string",
      "enum": [
        "openai",
        "anthropic",
        "fal",
        "unsplash"
      ]
    }
  },
  "required": [
    "document",
    "sectionId",
    "slotId"
  ]
}
```

Input type:

```ts
{ document: { [x: string]: unknown; schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; themeVoice: string; sections: { [x: string]: unknown; id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; enabled: boolean; slots: Record<string, { [x: string]: unknown; mode: "custom" | "inherit" | "hidden"; value?: unknown; provenance?: "manual" | "legacy" | "generated" | "fallback" | undefined; generation?: Record<string, unknown> | undefined; }>; }[]; legacy: { [x: string]: unknown; raw: unknown; resolvedFallbacks: Record<string, unknown>; rendererVersion: string; themeSnapshot?: unknown; }; facts?: Record<string, unknown> | undefined; }; sectionId: string; slotId: string; provider?: "unsplash" | "fal" | "anthropic" | "openai" | undefined; }
```

Validation: generateSchema


### Expected responses

HTTP 200

```ts
{ value: { url: string; alt: string; source: string; prompt: string; width: number; height: number; }; provenance: string; }
```

HTTP 200

```ts
GeneratedTextSlot | CatalogImageSlot | LibraryImageSlot
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## POST /v1/stores/:id/content-document/publish

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/content-document/publish" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: paramsSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "revisionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expectedPublishedId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expectedDraftId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "revisionId",
    "expectedPublishedId",
    "expectedDraftId"
  ]
}
```

Input type:

```ts
{ revisionId: string; expectedPublishedId: string | null; expectedDraftId: string | null; }
```

Validation: activateSchema


### Expected responses

HTTP 200

```ts
{ publishedId: string | null; draftId: string | null; rendererVersion: string; }
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## GET /v1/stores/:id/content-document/revisions/:revisionId

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/content-document/revisions/:revisionId" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "revisionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id",
    "revisionId"
  ]
}
```

Input type:

```ts
{ id: string; revisionId: string; }
```

Validation: z.object({ id: z.uuid(), revisionId: z.uuid() })


### Expected responses

HTTP 200

```ts
{ document: { [x: string]: unknown; schemaVersion: 1; storeType: "agency" | "nutra" | "classic" | "marketplace"; themeVoice: string; facts: Record<string, unknown>; sections: { [x: string]: unknown; id: string; family: "topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"; enabled: boolean; slots: Record<string, { [x: string]: unknown; mode: "custom" | "inherit" | "hidden"; provenance: "manual" | "legacy" | "generated" | "fallback"; value?: unknown; generation?: Record<string, unknown> | undefined; }>; }[]; legacy: { [x: string]: unknown; raw: unknown; resolvedFallbacks: Record<string, unknown>; rendererVersion: string; themeSnapshot?: unknown; }; }; id: string; store_id: string; owner_id: string; kind: "legacy" | "document"; created_at: string; parent_id: string | null; }
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## POST /v1/stores/:id/content-document/rollback

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/content-document/rollback" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: string; }
```

Validation: paramsSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "revisionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expectedPublishedId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expectedDraftId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "revisionId",
    "expectedPublishedId",
    "expectedDraftId"
  ]
}
```

Input type:

```ts
{ revisionId: string; expectedPublishedId: string | null; expectedDraftId: string | null; }
```

Validation: activateSchema


### Expected responses

HTTP 200

```ts
{ publishedId: string | null; draftId: string | null; rendererVersion: string; }
```

HTTP 200

```ts
{ error: string; diagnostics: ContentDiagnostic[]; }
```


## POST /v1/stores/:id/content/generate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/content/generate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "anthropic",
        "openai"
      ]
    },
    "refresh_image": {
      "default": true,
      "type": "boolean"
    }
  }
}
```

Input type:

```ts
{ provider?: "anthropic" | "openai" | undefined; refresh_image?: boolean | undefined; }
```

Validation: contentGenerationSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 200

```ts
{ content: { [x: string]: unknown; } | { hero_eyebrow: string; hero_title: string; hero_body: string; hero_cta: string; trending_title: string; bestsellers_title: string; new_arrivals_title: string; our_picks_title: string; product_grid_title: string; categories_eyebrow: string; categories_title: string; story_eyebrow: string; story_title: string; story_body: string; story_link: string; faq_title: string; faq_shipping_question: string; faq_shipping: string; faq_returns_question: string; faq_returns: string; faq_support_question: string; faq_support: string; newsletter_eyebrow: string; newsletter_title: string; newsletter_body: string; newsletter_button: string; } | { hero_title: string; hero_body: string; hero_cta: string; about_title: string; about_body: string; agency_cta: string; agency_contact_intro: string; agency_services: { slug: "meta-ads" | "tiktok-ads" | "ecommerce-strategy" | "creative-strategy"; title: string; summary: string; body: string; deliverables: string[]; }[]; agency_process: { title: string; body: string; }[]; agency_faq: { question: string; answer: string; }[]; }; provider: "anthropic" | "openai" | null; image_updated: boolean; }
```

HTTP 502

```ts
{ error: string; }
```


## POST /v1/stores/:id/design-review

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/design-review" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 404

```ts
{ error: string; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 202

```ts
{ id: any; status: any; }
```


## GET /v1/stores/:id/design-reviews

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/design-reviews" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
{ id: any; status: any; engine_version: any; report: any; error: any; created_at: any; updated_at: any; }[]
```


## GET /v1/stores/:id/design-reviews/:reviewId/files/:file

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/design-reviews/:reviewId/files/:file" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "reviewId": {
      "type": "string"
    },
    "file": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "reviewId",
    "file"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ url: string; }
```


## POST /v1/stores/:id/design-reviews/:reviewId/retry

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/design-reviews/:reviewId/retry" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "reviewId": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "reviewId"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 409

```ts
{ error: string; }
```

HTTP 202

```ts
{ id: any; }
```


## PUT /v1/stores/:id/domain-assignment

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/stores/:id/domain-assignment" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_current_domain_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "domain_id",
    "expected_current_domain_id"
  ]
}
```

Input type:

```ts
{ domain_id: string | null; expected_current_domain_id: string | null; }
```

Validation: storeDomainAssignmentSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ [x: string]: unknown; }
```


## POST /v1/stores/:id/domain/check

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/domain/check" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
    },
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "domain"
  ]
}
```

Input type:

```ts
{ domain: string; store_id?: string | undefined; }
```

Validation: domainCheckSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ domain: string; available: boolean; verified: boolean; price: number | null; currency: string; premium: boolean; premiumRegistrationPrice: number | null; premiumRenewalPrice: number | null; premiumRestorePrice: number | null; premiumTransferPrice: number | null; icannFee: number | null; eapFee: number | null; errorNo: string; description: string; dryRun: boolean; }
```


## POST /v1/stores/:id/domain/connect

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/domain/connect" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ checkRan: boolean; dns: { host: string; ip: string; records: { type: string; name: string; value: string; }[]; }; id: any; owner_id: any; company_id: any; store_id: any; domain: any; provider: any; status: any; error: any; order_id: any; transaction_id: any; namecheap_id: any; charged_amount: any; currency: any; privacy_enabled: any; non_real_time: any; purchased_at: any; created_at: any; updated_at: any; external_token: any; external_verified_at: any; external_target_store_id: any; external_checked_at: any; external_next_check_at: any; external_dns: any; }
```

HTTP 409

```ts
{ error: string; }
```

HTTP 200

```ts
{ execution: "synchronous"; status: "pending_purchase" | "purchased" | "dns_pending" | "live"; dryRun: boolean; dnsUpdated: boolean; renderVerification: string; }
```


## POST /v1/stores/:id/domain/provision

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/domain/provision" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
    },
    "max_total": {
      "type": "number",
      "minimum": 0,
      "multipleOf": 0.01
    },
    "connect": {
      "default": true,
      "type": "boolean"
    }
  }
}
```

Input type:

```ts
{ domain?: string | undefined; max_total?: number | undefined; connect?: boolean | undefined; }
```

Validation: provisionSchema


### Expected responses

HTTP 400

```ts
{ error: string | undefined; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ store_id: string; store_name: string; domain: string | null; source: ProvisionSource; purchase: { status: string; charged_amount: unknown; currency: unknown; max_total: number; } | null; assigned: boolean; support_email: string | null; connection: DomainExecutionResult | { error: string; retryAt?: number | undefined; } | null; }
```

HTTP 409

```ts
{ error: string; code: string; }
```


## POST /v1/stores/:id/domain/purchase

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/domain/purchase" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
Path parameters
```

Validation: See schema


### Expected responses

HTTP 410

```ts
{ code: string; error: string; }
```


## GET /v1/stores/:id/domain/status

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/domain/status" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ domain: any; domain_status: any; domain_error: any; domain_order_id: any; domain_transaction_id: any; domain_namecheap_id: any; domain_charged_amount: any; domain_currency: any; domain_privacy_enabled: any; domain_non_real_time: any; domain_purchased_at: any; }
```


## POST /v1/stores/:id/duplicate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/duplicate" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 201

```ts
stores
```


## GET /v1/stores/:id/merchant-checklist

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/merchant-checklist" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 404

```ts
{ error: string; }
```

HTTP 422

```ts
{ error: string; }
```

HTTP 200

```ts
{ checkedAt: string; storeType: "agency"; productCount: number; checks: MerchantChecklistCheck[]; } | { checkedAt: string; storeType: "nutra" | "classic" | "marketplace"; productCount: number; checks: MerchantChecklistCheck[]; }
```


## GET /v1/stores/:id/nmi

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/nmi" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ configured: boolean; username: string; }
```


## POST /v1/stores/:id/originality

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/originality" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "type": "object",
  "properties": {
    "reroll": {
      "type": "boolean",
      "default": false
    }
  }
}
```

Input type:

```ts
{reroll?:boolean}
```

Validation: reroll === true


### Expected responses

HTTP 404

```ts
{ error: string; }
```

HTTP 202

```ts
{ revision: number; scope: string; review_id: any; rerolled: boolean; }
```


## GET /v1/stores/:id/payment-gateway

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/payment-gateway" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 200

```ts
{ processing_mode: "live" | "disabled" | "test"; key_configured: boolean; key_fingerprint: string | null; updated_at: string | null; }
```

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```


## PUT /v1/stores/:id/payment-gateway

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/stores/:id/payment-gateway" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "processing_mode": {
      "type": "string",
      "enum": [
        "disabled",
        "test",
        "live"
      ]
    },
    "security_key": {
      "type": "string",
      "maxLength": 512
    },
    "clear_security_key": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
StoreGatewayInput
```

Validation: storeGatewayInputSchema (saveStoreGateway)


### Expected responses

HTTP 200

```ts
{ processing_mode: "live" | "disabled" | "test"; key_configured: boolean; key_fingerprint: string | null; updated_at: string | null; }
```

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ error: string; }
```

HTTP 503

```ts
{ error: string; }
```


## GET /v1/stores/:id/preview-url

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/preview-url" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 404

```ts
{ error: string; }
```

HTTP 200

```ts
{ preview: string; local: string; online: string | null; onlineAvailable: boolean; }
```


## GET /v1/stores/:id/product-assets

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/product-assets" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "page_size": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "kind": {
      "default": "packshot",
      "type": "string",
      "enum": [
        "packshot",
        "lifestyle"
      ]
    },
    "branding_mode": {
      "type": "string",
      "enum": [
        "private_label",
        "preserve_brand"
      ]
    }
  },
  "additionalProperties": false
}
```

Input type:

```ts
{ page?: unknown; page_size?: unknown; kind?: "packshot" | "lifestyle" | undefined; branding_mode?: "private_label" | "preserve_brand" | undefined; }
```

Validation: querySchema


### Expected responses

HTTP 200

```ts
{ asset_total: number; page: number; page_size: number; data: { id: string; generation: number; product_id: string; product_name: unknown; kind: ProductAssetKind; branding_mode: ProductAssetBrandingMode; status: ProductAssetState; attempts: number; images: { [x: string]: unknown; }[]; progress: unknown; error_code: unknown; error: unknown; model: unknown; qc_report: { [x: string]: unknown; }; provenance: { [x: string]: unknown; }; created_at: unknown; updated_at: unknown; completed_at: unknown; manual_review: {} | null; regeneration_notes: {}; can_review: boolean; can_regenerate: boolean; retryable: boolean; }[]; total: number; missing: number; queued: number; running: number; ready: number; failed: number; }
```


## POST /v1/stores/:id/product-assets/enqueue

Authentication: api-key-or-session. Rate limit: 30 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/product-assets/enqueue" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "product_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "kind": {
      "type": "string",
      "enum": [
        "packshot",
        "lifestyle"
      ]
    },
    "branding_mode": {
      "type": "string",
      "enum": [
        "private_label",
        "preserve_brand"
      ]
    },
    "generation_basis": {
      "type": "string",
      "const": "catalog"
    }
  },
  "required": [
    "product_ids"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ product_ids: string[]; kind?: "packshot" | "lifestyle" | undefined; branding_mode?: "private_label" | "preserve_brand" | undefined; generation_basis?: "catalog" | undefined; }
```

Validation: enqueueBody


### Expected responses

HTTP 202

```ts
{ accepted: number; created: number; }
```


## POST /v1/stores/:id/product-assets/regenerate

Authentication: api-key-or-session. Rate limit: 15 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/product-assets/regenerate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "asset_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "generation_basis": {
      "type": "string",
      "const": "catalog"
    }
  },
  "required": [
    "asset_ids"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ asset_ids: string[]; generation_basis?: "catalog" | undefined; }
```

Validation: regenerateBody


### Expected responses

HTTP 202

```ts
{ accepted: number; created: number; }
```


## POST /v1/stores/:id/product-assets/reject

Authentication: api-key-or-session. Rate limit: 15 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/product-assets/reject" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "asset_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "reason": {
      "type": "string",
      "minLength": 10,
      "maxLength": 1200
    }
  },
  "required": [
    "asset_ids",
    "reason"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ asset_ids: string[]; reason: string; }
```

Validation: rejectBody


### Expected responses

HTTP 200

```ts
{ rejected: number; already_rejected: number; }
```


## POST /v1/stores/:id/product-assets/retry

Authentication: api-key-or-session. Rate limit: 15 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/product-assets/retry" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "asset_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    }
  },
  "required": [
    "asset_ids"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ asset_ids: string[]; }
```

Validation: retryBody


### Expected responses

HTTP 202

```ts
{ retried: number; }
```


## GET /v1/stores/:id/publication

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/:id/publication" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ online: boolean; published: boolean; domain: string | null; domainStatus: string; status: string; blockers: string[]; canPublish: boolean; }
```

HTTP 200

```ts
{ error: string; }
```


## POST /v1/stores/:id/publication

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/:id/publication" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ online: boolean; published: boolean; domain: string | null; domainStatus: string; status: string; blockers: string[]; canPublish: boolean; }
```

HTTP 200

```ts
{ error: string; }
```


## PATCH /v1/stores/:id/status

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PATCH "$BANKPAGE_ORIGIN/v1/stores/:id/status" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "type": "object",
  "properties": {
    "id": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
string
```

Validation: uuidSchema

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

Input type:

```ts
{ status: "active" | "inactive"; }
```

Validation: statusUpdateSchema


### Expected responses

HTTP 200

```ts
stores
```


## POST /v1/stores/branding/generate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/branding/generate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "categories": {
      "default": [],
      "maxItems": 60,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 200
      }
    },
    "storeType": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace",
        "agency"
      ]
    },
    "storeName": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "primaryColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "logo",
        "favicon"
      ]
    }
  },
  "required": [
    "storeName",
    "primaryColor",
    "kind"
  ]
}
```

Input type:

```ts
{ storeName: string; primaryColor: string; kind: "logo" | "favicon"; categories?: string[] | undefined; storeType?: "agency" | "nutra" | "classic" | "marketplace" | undefined; }
```

Validation: brandingGenerationSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ url: string; source: string; }
```

HTTP 502

```ts
{ error: string; }
```


## POST /v1/stores/content/generate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/content/generate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "storeType": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace",
        "agency"
      ]
    },
    "provider": {
      "type": "string",
      "enum": [
        "anthropic",
        "openai"
      ]
    },
    "storeName": {
      "type": "string",
      "minLength": 2
    },
    "companyName": {
      "type": "string",
      "minLength": 2
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2
      }
    },
    "description": {
      "type": "string",
      "minLength": 10
    },
    "supportEmail": {
      "type": "string",
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "phone": {
      "type": "string",
      "minLength": 8
    }
  },
  "required": [
    "provider",
    "storeName",
    "companyName",
    "categories",
    "description",
    "supportEmail",
    "phone"
  ]
}
```

Input type:

```ts
{ provider: "anthropic" | "openai"; storeName: string; companyName: string; categories: string[]; description: string; supportEmail: string; phone: string; storeType?: "agency" | "nutra" | "classic" | "marketplace" | undefined; }
```

Validation: draftContentGenerationSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ content: Record<string, never> | { hero_eyebrow: string; hero_title: string; hero_body: string; hero_cta: string; trending_title: string; bestsellers_title: string; new_arrivals_title: string; our_picks_title: string; product_grid_title: string; categories_eyebrow: string; categories_title: string; story_eyebrow: string; story_title: string; story_body: string; story_link: string; faq_title: string; faq_shipping_question: string; faq_shipping: string; faq_returns_question: string; faq_returns: string; faq_support_question: string; faq_support: string; newsletter_eyebrow: string; newsletter_title: string; newsletter_body: string; newsletter_button: string; } | { hero_title: string; hero_body: string; hero_cta: string; about_title: string; about_body: string; agency_cta: string; agency_contact_intro: string; agency_services: { slug: "meta-ads" | "tiktok-ads" | "ecommerce-strategy" | "creative-strategy"; title: string; summary: string; body: string; deliverables: string[]; }[]; agency_process: { title: string; body: string; }[]; agency_faq: { question: string; answer: string; }[]; }; provider: "anthropic" | "openai"; }
```

HTTP 502

```ts
{ error: string; }
```


## POST /v1/stores/domain/check

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/domain/check" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9]{0,61}[a-z0-9])?\\.com$"
    },
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "domain"
  ]
}
```

Input type:

```ts
{ domain: string; store_id?: string | undefined; }
```

Validation: domainCheckSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ domain: string; available: boolean; verified: boolean; price: number | null; currency: string; premium: boolean; premiumRegistrationPrice: number | null; premiumRenewalPrice: number | null; premiumRestorePrice: number | null; premiumTransferPrice: number | null; icannFee: number | null; eapFee: number | null; errorNo: string; description: string; dryRun: boolean; }
```


## POST /v1/stores/domain/provision-all

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/domain/provision-all" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "site_kind": {
      "type": "string",
      "enum": [
        "store",
        "agency"
      ]
    }
  }
}
```

Input type:

```ts
{ site_kind?: "store" | "agency" | undefined; }
```

Validation: provisionAllSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 202

```ts
{ queued: number; stores: ProvisionProgress[]; }
```


## GET /v1/stores/domain/provision-status

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/stores/domain/provision-status" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ stores: ProvisionProgress[]; }
```


## POST /v1/stores/domain/suggestions

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/domain/suggestions" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "store_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "limit": {
      "default": 12,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "required": [
    "name"
  ]
}
```

Input type:

```ts
{ name: string; slug?: string | undefined; store_id?: string | undefined; limit?: number | undefined; }
```

Validation: domainSuggestionsSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ suggestions: never[]; dryRun: boolean; }
```

HTTP 200

```ts
{ suggestions: DomainCheck[]; dryRun: boolean; }
```


## POST /v1/stores/media/generate

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/media/generate" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "storeType": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace",
        "agency"
      ]
    },
    "storeName": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "primaryColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "categories": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2
      }
    },
    "slot": {
      "type": "string",
      "enum": [
        "hero_image",
        "story_image",
        "category_banner_image",
        "newsletter_image",
        "contact_image"
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "fal",
        "unsplash"
      ]
    },
    "query": {
      "type": "string",
      "maxLength": 160
    }
  },
  "required": [
    "storeName",
    "primaryColor",
    "slot",
    "mode"
  ]
}
```

Input type:

```ts
{ storeName: string; primaryColor: string; slot: "hero_image" | "story_image" | "category_banner_image" | "newsletter_image" | "contact_image"; mode: "unsplash" | "fal"; storeType?: "agency" | "nutra" | "classic" | "marketplace" | undefined; categories?: string[] | undefined; query?: string | undefined; }
```

Validation: mediaGenerationSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ image: { url: string; alt: string; source: string; unsplash_id: string; attribution: { name: string; link: string; }; }; }
```

HTTP 200

```ts
{ image: { url: string; alt: string; source: string; }; }
```

HTTP 502

```ts
{ error: string; }
```


## POST /v1/stores/pre-match

Authentication: api-key-or-session. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/stores/pre-match" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "store_type": {
      "type": "string",
      "enum": [
        "nutra",
        "classic",
        "marketplace"
      ]
    },
    "category_ids": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "price_points": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": 0,
        "multipleOf": 0.01
      }
    },
    "products_per_category": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "category_ids",
    "price_points",
    "products_per_category"
  ]
}
```

Input type:

```ts
{ category_ids: string[]; price_points: number[]; products_per_category: number; store_type?: "nutra" | "classic" | "marketplace" | undefined; }
```

Validation: preMatchSchema


### Expected responses

HTTP 400

```ts
{ error: string; }
```

HTTP 200

```ts
{ price_points: number[]; products_per_category: number; found: number; selected: number; complete: boolean; missing_price_points: number[]; categories: CategoryMatch[]; }
```

HTTP 500

```ts
{ error: string; }
```


## GET /v1/subscriptions

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/subscriptions" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ data: { id: any; store_id: any; email: any; created_at: any; stores: { name: any; slug: any; }[]; }[]; }
```


## GET /v1/templates

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/templates" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

No body or query parameters.

### Expected responses

HTTP 200

```ts
{ data: readonly DocumentTemplate[]; }
```


## DELETE /v1/templates/:id/html

Authentication: administrator. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X DELETE "$BANKPAGE_ORIGIN/v1/templates/:id/html" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "agreements-fulfillment-box-v1",
        "agreements-fulfillment-hub-v1",
        "agreements-chargeback-cb911-v1",
        "agreements-customer-service-ztech-v1",
        "agreements-fulfillment-efs-v1",
        "agreements-fulfillment-ninja-v1",
        "agreements-fulfillment-fullstack-v1",
        "agreements-fulfillment-x-v1",
        "personal-bank-statement-wells-fargo-v1",
        "personal-bank-statement-chase-v1",
        "personal-bank-statement-sofi-v1",
        "personal-bank-statement-america-first-v1",
        "phone-bill-verizon-v1",
        "personal-bank-statement-woodforest-v1",
        "personal-bank-statement-go2bank-v1",
        "personal-bank-statement-boa-v1",
        "personal-bank-statement-usaa-v1",
        "personal-bank-statement-commerce-v1",
        "personal-bank-statement-paypal-v1",
        "personal-bank-statement-ascend-v1",
        "personal-bank-statement-navy-federal-v1",
        "personal-bank-statement-ibc-v1",
        "personal-bank-statement-pnc-v1",
        "personal-bank-statement-cash-app-v1",
        "personal-bank-statement-penn-community-v1",
        "phone-bill-uscellular-v1",
        "phone-bill-metro-v1",
        "utility-bill-kentuckypower-v1",
        "utility-bill-duke-v1",
        "utility-bill-evergy-v1",
        "utility-bill-pge-v1",
        "utility-bill-nvenergy-v1",
        "utility-bill-columbiagas-v1",
        "utility-bill-xoom-v1",
        "utility-bill-fpl-v1",
        "utility-bill-aps-v1",
        "utility-bill-ouc-v1",
        "utility-bill-gng-v1",
        "tax-return-2025-v1",
        "phone-bill-tmobile-v1",
        "phone-bill-xfinity-v1",
        "phone-bill-spectrum-v1",
        "personal-bank-statement-varo-v1",
        "tax-return-2024-v1",
        "agreements-crm-sticky-v1",
        "agreements-chargeback-v1",
        "agreements-fulfillment-nextday-v1",
        "agreements-customer-service-logicall-v1",
        "utility-bill-att-v1",
        "tax-return-confirmation-freetaxusa-2025-v1",
        "tax-return-confirmation-freetaxusa-2024-v1",
        "tax-return-confirmation-turbotax-2025-v1",
        "business-bank-letter-mercury-v1",
        "business-bank-letter-bluebanc-v1",
        "business-bank-letter-slash-v1",
        "business-bank-statement-slash-v1",
        "business-bank-statement-bluebanc-v1",
        "business-bank-statement-relay-v1",
        "business-bank-statement-mercury-v1",
        "personal-bank-statement-dailypay-v1",
        "personal-bank-statement-chime-v1",
        "personal-bank-statement-capitalone-v1",
        "personal-bank-statement-bmo-v1",
        "phone-bill-att-v1",
        "processing-statement-kurv-v1",
        "processing-statement-netevia-v1",
        "processing-statement-paysafe-v1",
        "processing-statement-shopify-v1",
        "processing-statement-stripe-v1",
        "processing-statement-stripe-v2",
        "gmp-certificate-blastup-v1",
        "business-bank-letter-v1",
        "personal-bank-statement-v1",
        "phone-bill-v1",
        "utility-bill-v1",
        "agreements-v1",
        "processing-statement-v1",
        "gmp-certificate-v1",
        "supplier-invoice-v1",
        "business-bank-statement-initial-deposit-v1",
        "business-bank-statement-v1",
        "business-bank-statement-cash-v2"
      ]
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); }
```

Validation: z.object({ id: templateIdSchema })


### Expected responses

HTTP 204

```ts
No response body
```


## GET /v1/templates/:id/html

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/templates/:id/html" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "agreements-fulfillment-box-v1",
        "agreements-fulfillment-hub-v1",
        "agreements-chargeback-cb911-v1",
        "agreements-customer-service-ztech-v1",
        "agreements-fulfillment-efs-v1",
        "agreements-fulfillment-ninja-v1",
        "agreements-fulfillment-fullstack-v1",
        "agreements-fulfillment-x-v1",
        "personal-bank-statement-wells-fargo-v1",
        "personal-bank-statement-chase-v1",
        "personal-bank-statement-sofi-v1",
        "personal-bank-statement-america-first-v1",
        "phone-bill-verizon-v1",
        "personal-bank-statement-woodforest-v1",
        "personal-bank-statement-go2bank-v1",
        "personal-bank-statement-boa-v1",
        "personal-bank-statement-usaa-v1",
        "personal-bank-statement-commerce-v1",
        "personal-bank-statement-paypal-v1",
        "personal-bank-statement-ascend-v1",
        "personal-bank-statement-navy-federal-v1",
        "personal-bank-statement-ibc-v1",
        "personal-bank-statement-pnc-v1",
        "personal-bank-statement-cash-app-v1",
        "personal-bank-statement-penn-community-v1",
        "phone-bill-uscellular-v1",
        "phone-bill-metro-v1",
        "utility-bill-kentuckypower-v1",
        "utility-bill-duke-v1",
        "utility-bill-evergy-v1",
        "utility-bill-pge-v1",
        "utility-bill-nvenergy-v1",
        "utility-bill-columbiagas-v1",
        "utility-bill-xoom-v1",
        "utility-bill-fpl-v1",
        "utility-bill-aps-v1",
        "utility-bill-ouc-v1",
        "utility-bill-gng-v1",
        "tax-return-2025-v1",
        "phone-bill-tmobile-v1",
        "phone-bill-xfinity-v1",
        "phone-bill-spectrum-v1",
        "personal-bank-statement-varo-v1",
        "tax-return-2024-v1",
        "agreements-crm-sticky-v1",
        "agreements-chargeback-v1",
        "agreements-fulfillment-nextday-v1",
        "agreements-customer-service-logicall-v1",
        "utility-bill-att-v1",
        "tax-return-confirmation-freetaxusa-2025-v1",
        "tax-return-confirmation-freetaxusa-2024-v1",
        "tax-return-confirmation-turbotax-2025-v1",
        "business-bank-letter-mercury-v1",
        "business-bank-letter-bluebanc-v1",
        "business-bank-letter-slash-v1",
        "business-bank-statement-slash-v1",
        "business-bank-statement-bluebanc-v1",
        "business-bank-statement-relay-v1",
        "business-bank-statement-mercury-v1",
        "personal-bank-statement-dailypay-v1",
        "personal-bank-statement-chime-v1",
        "personal-bank-statement-capitalone-v1",
        "personal-bank-statement-bmo-v1",
        "phone-bill-att-v1",
        "processing-statement-kurv-v1",
        "processing-statement-netevia-v1",
        "processing-statement-paysafe-v1",
        "processing-statement-shopify-v1",
        "processing-statement-stripe-v1",
        "processing-statement-stripe-v2",
        "gmp-certificate-blastup-v1",
        "business-bank-letter-v1",
        "personal-bank-statement-v1",
        "phone-bill-v1",
        "utility-bill-v1",
        "agreements-v1",
        "processing-statement-v1",
        "gmp-certificate-v1",
        "supplier-invoice-v1",
        "business-bank-statement-initial-deposit-v1",
        "business-bank-statement-v1",
        "business-bank-statement-cash-v2"
      ]
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); }
```

Validation: z.object({ id: templateIdSchema })

### query

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "const": "document"
    }
  }
}
```

Input type:

```ts
{ mode?: "document" | undefined; }
```

Validation: z.object({ mode: z.literal('document').optional() })


### Expected responses

HTTP 200

```ts
{ mode: "document"; pageWidth: number; html: string; customized: boolean; revision: string; assets: { token: string; mime: string; name: string; }[]; variables: string[]; }
```

HTTP 200

```ts
{ html: string; builtinHtml: string; customized: boolean; contentPlaceholder: string; }
```


## PUT /v1/templates/:id/html

Authentication: administrator. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 8388608 bytes. JSON unless no body is specified.

### Request

```sh
curl -X PUT "$BANKPAGE_ORIGIN/v1/templates/:id/html" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "agreements-fulfillment-box-v1",
        "agreements-fulfillment-hub-v1",
        "agreements-chargeback-cb911-v1",
        "agreements-customer-service-ztech-v1",
        "agreements-fulfillment-efs-v1",
        "agreements-fulfillment-ninja-v1",
        "agreements-fulfillment-fullstack-v1",
        "agreements-fulfillment-x-v1",
        "personal-bank-statement-wells-fargo-v1",
        "personal-bank-statement-chase-v1",
        "personal-bank-statement-sofi-v1",
        "personal-bank-statement-america-first-v1",
        "phone-bill-verizon-v1",
        "personal-bank-statement-woodforest-v1",
        "personal-bank-statement-go2bank-v1",
        "personal-bank-statement-boa-v1",
        "personal-bank-statement-usaa-v1",
        "personal-bank-statement-commerce-v1",
        "personal-bank-statement-paypal-v1",
        "personal-bank-statement-ascend-v1",
        "personal-bank-statement-navy-federal-v1",
        "personal-bank-statement-ibc-v1",
        "personal-bank-statement-pnc-v1",
        "personal-bank-statement-cash-app-v1",
        "personal-bank-statement-penn-community-v1",
        "phone-bill-uscellular-v1",
        "phone-bill-metro-v1",
        "utility-bill-kentuckypower-v1",
        "utility-bill-duke-v1",
        "utility-bill-evergy-v1",
        "utility-bill-pge-v1",
        "utility-bill-nvenergy-v1",
        "utility-bill-columbiagas-v1",
        "utility-bill-xoom-v1",
        "utility-bill-fpl-v1",
        "utility-bill-aps-v1",
        "utility-bill-ouc-v1",
        "utility-bill-gng-v1",
        "tax-return-2025-v1",
        "phone-bill-tmobile-v1",
        "phone-bill-xfinity-v1",
        "phone-bill-spectrum-v1",
        "personal-bank-statement-varo-v1",
        "tax-return-2024-v1",
        "agreements-crm-sticky-v1",
        "agreements-chargeback-v1",
        "agreements-fulfillment-nextday-v1",
        "agreements-customer-service-logicall-v1",
        "utility-bill-att-v1",
        "tax-return-confirmation-freetaxusa-2025-v1",
        "tax-return-confirmation-freetaxusa-2024-v1",
        "tax-return-confirmation-turbotax-2025-v1",
        "business-bank-letter-mercury-v1",
        "business-bank-letter-bluebanc-v1",
        "business-bank-letter-slash-v1",
        "business-bank-statement-slash-v1",
        "business-bank-statement-bluebanc-v1",
        "business-bank-statement-relay-v1",
        "business-bank-statement-mercury-v1",
        "personal-bank-statement-dailypay-v1",
        "personal-bank-statement-chime-v1",
        "personal-bank-statement-capitalone-v1",
        "personal-bank-statement-bmo-v1",
        "phone-bill-att-v1",
        "processing-statement-kurv-v1",
        "processing-statement-netevia-v1",
        "processing-statement-paysafe-v1",
        "processing-statement-shopify-v1",
        "processing-statement-stripe-v1",
        "processing-statement-stripe-v2",
        "gmp-certificate-blastup-v1",
        "business-bank-letter-v1",
        "personal-bank-statement-v1",
        "phone-bill-v1",
        "utility-bill-v1",
        "agreements-v1",
        "processing-statement-v1",
        "gmp-certificate-v1",
        "supplier-invoice-v1",
        "business-bank-statement-initial-deposit-v1",
        "business-bank-statement-v1",
        "business-bank-statement-cash-v2"
      ]
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); }
```

Validation: z.object({ id: templateIdSchema })

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string"
    }
  }
}
```

Input type:

```ts
{ mode?: string | undefined; }
```

Validation: z.object({ mode: z.string().optional() })

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "const": "document"
    },
    "html": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4194304
    },
    "revision": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64
    }
  },
  "required": [
    "mode",
    "html",
    "revision"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ mode: "document"; html: string; revision: string; }
```

Validation: z
            .strictObject({
              mode: z.literal('document'),
              html: z
                .string()
                .min(1)
                .max(4 * 1024 * 1024),
              revision: z.string().length(64),
            })

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "html": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512000
    }
  },
  "required": [
    "html"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ html: string; }
```

Validation: templateOverrideSchema


### Expected responses

HTTP 200

```ts
{ saved: boolean; }
```

HTTP 200

```ts
{ html: string; }
```


## POST /v1/templates/:id/html/preview

Authentication: administrator. Rate limit: 180 requests per 1 minute per IP; JSON body limit: 8388608 bytes. JSON unless no body is specified.

### Request

```sh
curl -X POST "$BANKPAGE_ORIGIN/v1/templates/:id/html/preview" -H "Authorization: Bearer $BANKPAGE_API_KEY" -H "Content-Type: application/json" --data-binary @request.json
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "agreements-fulfillment-box-v1",
        "agreements-fulfillment-hub-v1",
        "agreements-chargeback-cb911-v1",
        "agreements-customer-service-ztech-v1",
        "agreements-fulfillment-efs-v1",
        "agreements-fulfillment-ninja-v1",
        "agreements-fulfillment-fullstack-v1",
        "agreements-fulfillment-x-v1",
        "personal-bank-statement-wells-fargo-v1",
        "personal-bank-statement-chase-v1",
        "personal-bank-statement-sofi-v1",
        "personal-bank-statement-america-first-v1",
        "phone-bill-verizon-v1",
        "personal-bank-statement-woodforest-v1",
        "personal-bank-statement-go2bank-v1",
        "personal-bank-statement-boa-v1",
        "personal-bank-statement-usaa-v1",
        "personal-bank-statement-commerce-v1",
        "personal-bank-statement-paypal-v1",
        "personal-bank-statement-ascend-v1",
        "personal-bank-statement-navy-federal-v1",
        "personal-bank-statement-ibc-v1",
        "personal-bank-statement-pnc-v1",
        "personal-bank-statement-cash-app-v1",
        "personal-bank-statement-penn-community-v1",
        "phone-bill-uscellular-v1",
        "phone-bill-metro-v1",
        "utility-bill-kentuckypower-v1",
        "utility-bill-duke-v1",
        "utility-bill-evergy-v1",
        "utility-bill-pge-v1",
        "utility-bill-nvenergy-v1",
        "utility-bill-columbiagas-v1",
        "utility-bill-xoom-v1",
        "utility-bill-fpl-v1",
        "utility-bill-aps-v1",
        "utility-bill-ouc-v1",
        "utility-bill-gng-v1",
        "tax-return-2025-v1",
        "phone-bill-tmobile-v1",
        "phone-bill-xfinity-v1",
        "phone-bill-spectrum-v1",
        "personal-bank-statement-varo-v1",
        "tax-return-2024-v1",
        "agreements-crm-sticky-v1",
        "agreements-chargeback-v1",
        "agreements-fulfillment-nextday-v1",
        "agreements-customer-service-logicall-v1",
        "utility-bill-att-v1",
        "tax-return-confirmation-freetaxusa-2025-v1",
        "tax-return-confirmation-freetaxusa-2024-v1",
        "tax-return-confirmation-turbotax-2025-v1",
        "business-bank-letter-mercury-v1",
        "business-bank-letter-bluebanc-v1",
        "business-bank-letter-slash-v1",
        "business-bank-statement-slash-v1",
        "business-bank-statement-bluebanc-v1",
        "business-bank-statement-relay-v1",
        "business-bank-statement-mercury-v1",
        "personal-bank-statement-dailypay-v1",
        "personal-bank-statement-chime-v1",
        "personal-bank-statement-capitalone-v1",
        "personal-bank-statement-bmo-v1",
        "phone-bill-att-v1",
        "processing-statement-kurv-v1",
        "processing-statement-netevia-v1",
        "processing-statement-paysafe-v1",
        "processing-statement-shopify-v1",
        "processing-statement-stripe-v1",
        "processing-statement-stripe-v2",
        "gmp-certificate-blastup-v1",
        "business-bank-letter-v1",
        "personal-bank-statement-v1",
        "phone-bill-v1",
        "utility-bill-v1",
        "agreements-v1",
        "processing-statement-v1",
        "gmp-certificate-v1",
        "supplier-invoice-v1",
        "business-bank-statement-initial-deposit-v1",
        "business-bank-statement-v1",
        "business-bank-statement-cash-v2"
      ]
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); }
```

Validation: z.object({ id: templateIdSchema })

### body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "const": "document"
    },
    "html": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4194304
    },
    "revision": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64
    }
  },
  "required": [
    "mode",
    "html",
    "revision"
  ],
  "additionalProperties": false
}
```

Input type:

```ts
{ mode: "document"; html: string; revision: string; }
```

Validation: z
          .strictObject({
            mode: z.literal('document'),
            html: z
              .string()
              .min(1)
              .max(4 * 1024 * 1024),
            revision: z.string().length(64),
          })


### Expected responses

HTTP 200

```ts
{ html: string; }
```


## GET /v1/templates/:id/preview

Authentication: api-key-or-session. Rate limit: 1200 requests per 1 minute per IP; JSON body limit: 1048576 bytes. JSON unless no body is specified.

### Request

```sh
curl -X GET "$BANKPAGE_ORIGIN/v1/templates/:id/preview" -H "Authorization: Bearer $BANKPAGE_API_KEY"
```

### params

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "agreements-fulfillment-box-v1",
        "agreements-fulfillment-hub-v1",
        "agreements-chargeback-cb911-v1",
        "agreements-customer-service-ztech-v1",
        "agreements-fulfillment-efs-v1",
        "agreements-fulfillment-ninja-v1",
        "agreements-fulfillment-fullstack-v1",
        "agreements-fulfillment-x-v1",
        "personal-bank-statement-wells-fargo-v1",
        "personal-bank-statement-chase-v1",
        "personal-bank-statement-sofi-v1",
        "personal-bank-statement-america-first-v1",
        "phone-bill-verizon-v1",
        "personal-bank-statement-woodforest-v1",
        "personal-bank-statement-go2bank-v1",
        "personal-bank-statement-boa-v1",
        "personal-bank-statement-usaa-v1",
        "personal-bank-statement-commerce-v1",
        "personal-bank-statement-paypal-v1",
        "personal-bank-statement-ascend-v1",
        "personal-bank-statement-navy-federal-v1",
        "personal-bank-statement-ibc-v1",
        "personal-bank-statement-pnc-v1",
        "personal-bank-statement-cash-app-v1",
        "personal-bank-statement-penn-community-v1",
        "phone-bill-uscellular-v1",
        "phone-bill-metro-v1",
        "utility-bill-kentuckypower-v1",
        "utility-bill-duke-v1",
        "utility-bill-evergy-v1",
        "utility-bill-pge-v1",
        "utility-bill-nvenergy-v1",
        "utility-bill-columbiagas-v1",
        "utility-bill-xoom-v1",
        "utility-bill-fpl-v1",
        "utility-bill-aps-v1",
        "utility-bill-ouc-v1",
        "utility-bill-gng-v1",
        "tax-return-2025-v1",
        "phone-bill-tmobile-v1",
        "phone-bill-xfinity-v1",
        "phone-bill-spectrum-v1",
        "personal-bank-statement-varo-v1",
        "tax-return-2024-v1",
        "agreements-crm-sticky-v1",
        "agreements-chargeback-v1",
        "agreements-fulfillment-nextday-v1",
        "agreements-customer-service-logicall-v1",
        "utility-bill-att-v1",
        "tax-return-confirmation-freetaxusa-2025-v1",
        "tax-return-confirmation-freetaxusa-2024-v1",
        "tax-return-confirmation-turbotax-2025-v1",
        "business-bank-letter-mercury-v1",
        "business-bank-letter-bluebanc-v1",
        "business-bank-letter-slash-v1",
        "business-bank-statement-slash-v1",
        "business-bank-statement-bluebanc-v1",
        "business-bank-statement-relay-v1",
        "business-bank-statement-mercury-v1",
        "personal-bank-statement-dailypay-v1",
        "personal-bank-statement-chime-v1",
        "personal-bank-statement-capitalone-v1",
        "personal-bank-statement-bmo-v1",
        "phone-bill-att-v1",
        "processing-statement-kurv-v1",
        "processing-statement-netevia-v1",
        "processing-statement-paysafe-v1",
        "processing-statement-shopify-v1",
        "processing-statement-stripe-v1",
        "processing-statement-stripe-v2",
        "gmp-certificate-blastup-v1",
        "business-bank-letter-v1",
        "personal-bank-statement-v1",
        "phone-bill-v1",
        "utility-bill-v1",
        "agreements-v1",
        "processing-statement-v1",
        "gmp-certificate-v1",
        "supplier-invoice-v1",
        "business-bank-statement-initial-deposit-v1",
        "business-bank-statement-v1",
        "business-bank-statement-cash-v2"
      ]
    }
  },
  "required": [
    "id"
  ]
}
```

Input type:

```ts
{ id: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); }
```

Validation: z.object({ id: templateIdSchema })


### Expected responses

HTTP 200

```ts
string
```

## Resource and response models

### flow_batches

```ts
FlowBatch & { owner_id: string; request_key: string; }
```

### flow_items

```ts
{ id: string; batch_id: string; owner_id: string; company_id: string; store_type: StoreType; store_id: string | null; ordinal: number; plan: FlowPlan; stage: FlowStage; status: "queued" | "running" | "waiting" | "failed" | "ready" | "cancelled"; attempts: number; error: string | null; next_attempt_at: string; updated_at?: string; lease_until?: string | null; lease_token?: string | null; domain?: string | null; delivery_mode?: "preview" | "live" | null; quality_progress?: FlowQualityProgress | null; }
```

### companies

```ts
BaseRow & CompanyFields & OwnedFields
```

### directors

```ts
BaseRow & DirectorFields & OwnedFields
```

### product_categories

```ts
BaseRow & CategoryFields & SharedAssetFields
```

### products

```ts
BaseRow & ProductFields & SharedAssetFields
```

### stores

```ts
BaseRow & { store_type?: "nutra" | "classic" | "marketplace" | "agency"; theme_config?: Json | null; publish_ready?: boolean; owner_id: string; company_id: string; theme_id: string | null; storefront_template?: string; generation_settings?: Record<string, unknown>; layout_config?: { id: string; enabled: boolean; }[] | null; design_dna?: DesignDNA | null; name: string; slug: string; domain: string | null; primary_color: string; currency: string; payment_methods: string[]; description: string; logo_url: string | null; favicon_url: string | null; support_email: string | null; support_phone?: string | null; support_hours?: string | null; commerce_policy?: CommercePolicy | null; use_company_return_facility?: boolean; descriptor: string; return_facility_name: string; return_address_line1: string; return_address_line2: string | null; return_city: string; return_state: string; return_postal_code: string; return_country: string; content: Json; legal_updated_at: string; nmi_tokenization_key: string | null; domain_status: DomainStatus; domain_error: string | null; price_points: number[]; products_per_category: number; } & StoreDomainReceiptFields
```

### domains

```ts
{ id: string; owner_id: string; company_id: string; store_id: string | null; domain: string; provider: "namecheap"; status: DomainRegistryStatus; error: string | null; order_id: string | null; transaction_id: string | null; namecheap_id: string | null; charged_amount: number | null; currency: string | null; privacy_enabled: boolean | null; non_real_time: boolean | null; contact_snapshot: Json | null; purchased_at: string | null; created_at: string; updated_at: string; }
```

### domain_purchase_batches

```ts
{ id: string; owner_id: string; idempotency_key: string; request_hash: string; status: "pending" | "completed" | "partial" | "failed" | "reconciliation_required"; max_total: number; estimated_total: number | null; currency: string | null; available_balance: number | null; result: Json | null; error: string | null; execution_started_at: string | null; heartbeat_at: string | null; created_at: string; updated_at: string; }
```

### domain_purchase_items

```ts
{ id: string; batch_id: string; owner_id: string; domain_id: string | null; company_id: string; domain: string; position: number; status: "not_attempted" | "reserved" | "purchasing" | "purchased" | "idempotent" | "failed" | "reconciliation_required"; quoted_price: number; icann_fee: number; estimated_total: number; currency: string; contact_snapshot: Json; provider_receipt: Json | null; error: string | null; created_at: string; updated_at: string; }
```

### mass_batches

```ts
BaseRow & { owner_id: string; name: string; total: number; completed: number; failed: number; config: Json; results: Json; }
```

### orders

```ts
BaseRow & { owner_id: string; store_id: string; type: OrderType; customer: Json; items: Json; total: number; currency: string; payment_provider: string | null; payment_reference: string | null; }
```

### FlowBatch

```ts
{ id: string; status: "draft" | "running" | "completed" | "cancelled"; config: Omit<FlowConfig, "price_points"> & { price_points?: number[]; }; created_at: string; items?: FlowItem[]; }
```

### StoreType

```ts
"agency" | "nutra" | "classic" | "marketplace"
```

### FlowPlan

```ts
{ name: string; domain?: string; version?: number; slug: string; company_name: string; category_ids: string[]; category_names: string[]; product_ids: string[]; price_points: number[]; product_snapshots?: FlowProductSnapshot[]; selection_mode?: "exact_prices" | "market_mix" | "none"; category_product_counts?: Record<string, number>; theme_id: string | null; theme_name: string; primary_color: string; font?: string; component_config?: Record<string, unknown>; }
```

### FlowStage

```ts
"store" | "ready" | "domain" | "content" | "logo" | "favicon" | "image" | "verify"
```

### FlowQualityProgress

```ts
{ review_id: string | null; phase: "recovery" | "capture" | "analyze" | "fix" | "verify" | "complete"; completed: number; total: number; agents_complete: number; agents_total: number; iteration: number; message: string; }
```

### BaseRow

```ts
{ id: string; created_at: string; updated_at: string; status: Status; }
```

### CompanyFields

```ts
{ name: string; company_type: string | null; incorporation_date: string | null; incorporation_state?: string | null; director_id?: string | null; customer_support_terms?: string | null; address_line1: string | null; address_line2: string | null; city: string | null; state: string | null; postal_code: string | null; country: string | null; owner_name: string; phone: string | null; email: string | null; fulfillment_return_facility_name: string | null; support_hours?: string | null; commerce_policy?: CommercePolicy | null; fulfillment_address_line1: string | null; fulfillment_address_line2: string | null; fulfillment_city: string | null; fulfillment_state: string | null; fulfillment_postal_code: string | null; fulfillment_country: string | null; }
```

### OwnedFields

```ts
{ owner_id: string; }
```

### DirectorFields

```ts
{ first_name: string; last_name: string; address_line1: string | null; address_line2: string | null; city: string | null; state: string | null; postal_code: string | null; country: string | null; personal_email: string | null; personal_phone: string | null; original_name: string | null; name_review_required: boolean; }
```

### CategoryFields

```ts
{ approved?: boolean; store_type?: "nutra" | "classic" | "marketplace"; name: string; theme: string; slug: string; parent_id: string | null; source: string; external_id: string; source_metadata: Json; }
```

### SharedAssetFields

```ts
{ owner_id: string | null; is_shared: boolean; }
```

### ProductFields

```ts
{ category_id: string; name: string; slug: string; description: string; price_before: number; price_after: number; images: Json; variations: Json; additional_info: Json; sort_order: number; source: string; source_sku: string; ean13: string | null; brand: string | null; source_price: number | null; source_metadata: Json; approved: boolean; }
```

### Json

```ts
string | number | boolean | { [key: string]: Json | undefined; } | Json[] | null
```

### DesignDNA

```ts
{ version: 1; sectionColorMode?: "light" | "dark" | "primal" | "primal-more" | undefined; sectionBackgrounds?: string[] | undefined; sectionBackdrops?: { enabled: boolean; opacity: number; sections: ("aboutStory" | "faq" | "ourPicks" | "newsletter")[]; } | undefined; seed: string; revision: number; palette: { primary: string; secondary: string; accent: string; background: string; surface: string; text: string; muted: string; border: string; onPrimary: string; onAccent: string; footer: string; onFooter: string; }; typography: { heading: string; body: string; ratio: number; weight: number; tracking: string; case: "none" | "uppercase"; }; shape: { radius: string; shadow: string; border: string; radii?: { sm: string; md: string; lg: string; full: string; } | undefined; }; spacing: { container: string; gutter: string; section: string; unit: string; }; motion: { personality: string; duration: number; ease: string; effects: string[]; }; decoration: { pattern: string; separator: string; background: string; layout: string; }; variants: Record<string, number>; layoutOrder: string[]; }
```

### CommercePolicy

```ts
{ product_purchase_options?: Record<string, { variations: { name: string; options: string[]; }[]; size_confirmation_required?: boolean | undefined; }> | undefined; shipping_carrier?: string | undefined; processing_days?: number | undefined; shipping_min_days?: number | undefined; shipping_max_days?: number | undefined; refund_processing_days?: number | undefined; refund_credit_min_days?: number | undefined; refund_credit_max_days?: number | undefined; }
```

### DomainStatus

```ts
"error" | "none" | "pending_purchase" | "purchased" | "dns_pending" | "live"
```

### StoreDomainReceiptFields

```ts
{ domain_order_id: string | null; domain_transaction_id: string | null; domain_namecheap_id: string | null; domain_charged_amount: number | null; domain_currency: string | null; domain_privacy_enabled: boolean | null; domain_non_real_time: boolean | null; domain_purchased_at: string | null; }
```

### DomainRegistryStatus

```ts
"reconciliation_required" | DomainStatus
```

### OrderType

```ts
"order" | "quote"
```

### JobMode

```ts
"disabled" | "pg-boss" | "in-process"
```

### ProductFact

```ts
{ label: string; value: string; }
```

### ApiOperation

```ts
{ method: string; path: string; auth: string; file: string; line: number; multipart: boolean; limits?: { requests: number; window: string; jsonBodyBytes: number; }; request: Record<string, { schema: unknown; type: string; validation?: string; }[]>; response: { status: number; type: string; }[]; }
```

### ApiKeyMetadata

```ts
{ id: string; name: string; prefix: string; created_at: string; expires_at: string | null; last_used_at: string | null; revoked_at: string | null; }
```

### ComponentCatalogItem

```ts
{ key: StorefrontComponentKey; label: string; group: ComponentGroup; description: string; }
```

### DocumentConfiguration

```ts
{ companyIds?: string[] | undefined; documents: { type: "business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"; templateId: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`); expenseProfileId?: string | undefined; periodStart?: string | undefined; periodEnd?: string | undefined; monthCount?: number | undefined; bankStatement?: { openingBalanceCents: number; closingBalanceCents: number; dailyCreditPolicy: "business_days" | "every_day" | "profile_frequency"; balanceMode?: "expense-ratio" | "exact-balances" | undefined; totalCreditsCents?: number | undefined; expenseAllocation?: { category: string; percent: number; minPercent?: number | undefined; maxPercent?: number | undefined; }[] | undefined; expenseRatio?: { minBps: number; maxBps: number; } | undefined; payoutTiming?: { settlementDays: number; bankTransferDays: number; variationPercent: number; spikeProbabilityPercent: number; } | undefined; } | undefined; processing?: ProcessingStatementSettings | undefined; processingTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; confirmationTemplateId?: `business-bank-statement-${string}` | `business-bank-letter-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | (`business-bank-statement-${string}` & `business-bank-statement-initial-deposit-${string}`) | (`tax-return-${string}` & `tax-return-confirmation-${string}`) | undefined; includeConfirmation?: boolean | undefined; processingDocumentFields?: { merchantNumber?: string | undefined; associationNumber?: string | undefined; officeNumber?: string | undefined; processorAccountId?: string | undefined; controlReference?: string | undefined; mailingReference?: string | undefined; dbaName?: string | undefined; locationAddress?: string | undefined; recipientName?: string | undefined; disputeWithdrawalRangeBps?: { minBps: number; maxBps: number; } | undefined; disputeWithdrawalBps?: number | undefined; thirdPartyAdjustmentIndexes?: number[] | undefined; } | undefined; initialDeposit?: { date: string; amountCents: number; } | undefined; mode?: "expense-engine" | "initial-deposit" | undefined; documentOptions?: { bank?: { statementTitle?: string | undefined; priorYtd?: { year: number; feesCents?: number | undefined; interestAndBonusesCents?: number | undefined; overdraftFeesCents?: number | undefined; } | undefined; letterSignatoryName?: string | undefined; letterSignatoryTitle?: string | undefined; statementReference?: string | undefined; mailingReference?: string | undefined; transactionReferences?: { transactionIndex: number; reference?: string | undefined; checkNumber?: string | undefined; }[] | undefined; overdraftCoverage?: "opted-in" | "opted-out" | undefined; overdraftProtection?: "none" | "enrolled" | undefined; americaFirstAccounts?: { kind: "visa" | "share" | "savings" | "auto" | "mortgage" | "additional-mortgage" | "line-credit"; accountMasked?: string | undefined; openingCents?: number | undefined; depositCents?: number | undefined; withdrawalCents?: number | undefined; annualRateBps?: number | undefined; advanceCents?: number | undefined; purchaseCents?: number | undefined; feeCents?: number | undefined; principalCents?: number | undefined; dueDate?: string | undefined; creditLimitCents?: number | undefined; minimumPaymentCents?: number | undefined; }[] | undefined; rewards?: { openingPoints?: number | undefined; earnedPoints?: number | undefined; redeemedPoints?: number | undefined; expiringPoints?: number | undefined; expirationDate?: string | undefined; } | undefined; } | undefined; reference?: string | undefined; phone?: { details?: { periodEnd?: string | undefined; cycleStart?: string | undefined; cycleEnd?: string | undefined; paymentDate?: string | undefined; noticeDate?: string | undefined; autoPayDate?: string | undefined; autoPayEnabled?: boolean | undefined; paymentReference?: string | undefined; serviceLabel?: string | undefined; charges?: Partial<Record<"feeCents" | "adjustmentCents" | "planChangeCents" | "universalCents" | "recoveryCents" | "taxGrossCents" | "taxStateCents" | "taxLocalCents" | "taxExciseCents" | "taxCountyCents" | "accountFederalCents" | "publicSafetyUnitCents" | "policeSafetyUnitCents" | "wireless911UnitCents" | "wirelessTowerUnitCents" | "accountCreditCents" | "accountPlanDiscountCents" | "accountProtectionCents" | "lateFeeMinimumCents", number>> | undefined; rates?: Partial<Record<"taxRateBps" | "stateRateBps" | "localRateBps" | "lateFeeRateBps" | "voiceAllocationBps" | "messagingAllocationBps" | "dataAllocationBps", number>> | undefined; payments?: { date: string; amountCents: number; }[] | undefined; lines?: { callCount?: number | undefined; talkMinutes?: number | undefined; number?: string | undefined; name?: string | undefined; planName?: string | undefined; device?: string | undefined; deviceId?: string | undefined; agreement?: string | undefined; promotionId?: string | undefined; installments?: number | undefined; installment?: number | undefined; remaining?: number | undefined; upgradeDate?: string | undefined; usageHundredthsGb?: number | undefined; charges?: Partial<Record<"universalCents" | "basePlanCents" | "deviceInstallmentCents" | "promotionCents" | "serviceCents" | "autoPayCents" | "targetedCents" | "administrativeCents" | "regulatoryCents" | "federalCents" | "administrativeDiscountCents" | "regulatoryDiscountCents" | "changeCents" | "widebandAccessCents" | "widebandCreditCents" | "usageCents" | "emergencyCents", number>> | undefined; rates?: Partial<Record<"stateRateBps" | "localRateBps", number>> | undefined; calls?: { date: string; minuteOfDay: number; number: string; origination: string; destination: string; minutes: number; airtimeCents: number; otherCents: number; }[] | undefined; }[] | undefined; } | undefined; accountNumber?: string | undefined; invoiceNumber?: string | undefined; dueDate?: string | undefined; previousBalanceCents?: number | undefined; paymentsCents?: number | undefined; basePlanCents?: number | undefined; serviceCents?: number | undefined; deviceInstallmentCents?: number | undefined; restoreFeeCents?: number | undefined; promotionCents?: number | undefined; oneTimeCents?: number | undefined; lineCount?: number | undefined; lineNumber?: string | undefined; usageHundredthsGb?: number | undefined; talkMinutes?: number | undefined; messages?: number | undefined; callCount?: number | undefined; } | undefined; agreement?: { representativeTitle?: string | undefined; supplierTitle?: string | undefined; dailyCallVolume?: number | undefined; callRateCents?: number | undefined; outboundCallRateCents?: number | undefined; clientBankName?: string | undefined; guarantorDateOfBirth?: string | undefined; businessRegistrationNumber?: string | undefined; guarantorTaxIdLast4?: string | undefined; preferredContactMethod?: string | undefined; contactHours?: string | undefined; paymentProcessor?: string | undefined; integrationMethod?: string | undefined; omsCrm?: string | undefined; initialPallets?: number | undefined; skuCount?: number | undefined; monthlyOrderVolume?: number | undefined; handleReturns?: boolean | undefined; fulfillmentServiceMode?: string | undefined; website?: string | undefined; clientCity?: string | undefined; clientState?: string | undefined; clientPostalCode?: string | undefined; clientCountry?: string | undefined; clientAddressLine2?: string | undefined; seats?: number | undefined; apiCalls?: number | undefined; startTime?: string | undefined; contractVersion?: string | undefined; weekdayHours?: string | undefined; offHours?: string | undefined; weekendHours?: string | undefined; weekendOffHours?: string | undefined; governingLaw?: string | undefined; clientSignatureDate?: string | undefined; supplierSignatureDate?: string | undefined; products?: string | undefined; lateFeeBps?: number | undefined; inventoryAccuracyFloorBps?: number | undefined; inventoryAccuracyTargetBps?: number | undefined; termMonths?: number | undefined; prepaidMonths?: number | undefined; monthlyCents?: number | undefined; transactionCents?: number | undefined; setupCents?: number | undefined; revenueBps?: number | undefined; serviceBps?: number | undefined; minuteRateCents?: number | undefined; threadRateCents?: number | undefined; emailRateCents?: number | undefined; minutes?: number | undefined; threads?: number | undefined; emails?: number | undefined; salesCents?: number | undefined; commissionBps?: number | undefined; retainerCents?: number | undefined; netDays?: number | undefined; rates?: { chargeback?: number | undefined; cdrnEthoca?: number | undefined; vmpi?: number | undefined; rdr?: number | undefined; sale?: number | undefined; credit?: number | undefined; monthlyMinimum?: number | undefined; integration?: number | undefined; } | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; invoice?: { commercialReference?: string | undefined; items?: { description: string; sku: string; quantity: number; unitCents: number; date?: string | undefined; }[] | undefined; discountBps?: number | undefined; taxBps?: number | undefined; shippingCents?: number | undefined; supplierName?: string | undefined; supplierAddress?: string | undefined; supplierRepresentative?: string | undefined; supplierEmail?: string | undefined; supplierPhone?: string | undefined; supplierBankName?: string | undefined; supplierBankAddress?: string | undefined; supplierBeneficiaryAddress?: string | undefined; supplierAccountMasked?: string | undefined; supplierRoutingMasked?: string | undefined; supplierTransitMasked?: string | undefined; supplierInstitutionMasked?: string | undefined; supplierSwiftMasked?: string | undefined; } | undefined; tax?: { occupation?: string | undefined; signatureDate?: string | undefined; wages?: number | undefined; householdWages?: number | undefined; interest?: number | undefined; dividends?: number | undefined; additionalIncome?: number | undefined; adjustments?: number | undefined; deduction?: number | undefined; illustrativeTax?: number | undefined; withholding?: number | undefined; filingStatus?: "single" | "married-joint" | "married-separate" | "head-of-household" | "qualifying-surviving-spouse" | undefined; digitalAssets?: boolean | undefined; qualifyingPersonName?: string | undefined; electionSpouseName?: string | undefined; electionSpouseSsnMasked?: string | undefined; identityProtectionPinMasked?: string | undefined; formerSpouseSsnMasked?: string | undefined; deceasedDate?: string | undefined; spouseDeceasedDate?: string | undefined; otherFiledStatus?: string | undefined; otherEarnedIncomeType?: string | undefined; otherTaxForm?: string | undefined; flags?: Partial<Record<"taxpayerClaimable" | "spouseClaimable" | "spouseItemizes" | "dualStatusAlien" | "taxpayerOlder" | "taxpayerBlind" | "spouseOlder" | "spouseBlind" | "presidentialFundTaxpayer" | "presidentialFundSpouse" | "nonresidentSpouseElection" | "lumpSumElection" | "scheduleDNotRequired" | "taxForm8814" | "taxForm4972" | "taxOtherForm" | "form8888" | "mainHomeUs" | "filedUnder30191002" | "combatZone" | "livedApartLastSixMonths" | "childQualifiedDividends" | "childOrdinaryDividends" | "iraRollover" | "iraQcd" | "iraOther" | "pensionRollover" | "pensionPso" | "pensionOther" | "livedApartEntireYear" | "childCapitalGain" | "clergyScheduleSe" | "declineEic" | "declineActc", boolean>> | undefined; lineAmounts?: Partial<Record<"7" | "13" | "17" | "19" | "20" | "23" | "26" | "27" | "28" | "29" | "30" | "31" | "36" | "38" | "1b" | "1c" | "1d" | "1e" | "1f" | "1g" | "1h" | "1i" | "2a" | "3a" | "4a" | "4b" | "5a" | "5b" | "6a" | "6b" | "7a" | "13a" | "13b" | "25b" | "25c" | "27a", number>> | undefined; spouse?: { firstName?: string | undefined; lastName?: string | undefined; ssnMasked?: string | undefined; occupation?: string | undefined; signatureDate?: string | undefined; identityProtectionPinMasked?: string | undefined; } | undefined; dependents?: { firstName: string; lastName: string; relationship: string; ssnMasked?: string | undefined; childTaxCredit?: boolean | undefined; otherDependentCredit?: boolean | undefined; livedWithYou?: boolean | undefined; livedInUs?: boolean | undefined; fullTimeStudent?: boolean | undefined; disabled?: boolean | undefined; }[] | undefined; refund?: { routingMasked?: string | undefined; accountMasked?: string | undefined; accountType?: "savings" | "checking" | undefined; } | undefined; thirdParty?: { authorized: boolean; name?: string | undefined; phone?: string | undefined; pinMasked?: string | undefined; } | undefined; preparer?: { name?: string | undefined; signatureDate?: string | undefined; ptin?: string | undefined; firmName?: string | undefined; phone?: string | undefined; address?: string | undefined; einMasked?: string | undefined; selfEmployed?: boolean | undefined; } | undefined; } | undefined; confirmation?: { refundCents?: number | undefined; refundMethod?: "check" | "bank" | undefined; acceptedDate?: string | undefined; acceptedClock?: string | undefined; printedDate?: string | undefined; printedClock?: string | undefined; username?: string | undefined; taxpayerName?: string | undefined; greetingName?: string | undefined; mailCity?: string | undefined; mailState?: string | undefined; mailZip?: string | undefined; deadline?: string | undefined; adjustedGrossIncomeCents?: number | undefined; taxableIncomeCents?: number | undefined; totalTaxCents?: number | undefined; totalPaymentsCents?: number | undefined; effectiveRateBps?: number | undefined; routingMasked?: string | undefined; accountMasked?: string | undefined; taxYear?: number | undefined; } | undefined; certificate?: { scope?: string | undefined; issuingBody?: string | undefined; accreditation?: string | undefined; validFrom?: string | undefined; validTo?: string | undefined; } | undefined; } | undefined; bankAccountOpenedDate?: string | undefined; }[]; }
```

### ProcessingStatementSettings

```ts
{ feeBps: number; reserveBps: number; refundRateBps: number; chargebackRateBps: number; aovCents: number; } & { advanced?: AdvancedProcessingSettings; }
```

### Card

```ts
Loan & { purchases: number; minimumPayment: number; threeYearPayment: number; minimumPlan: { months: number; total: number; }; threeYearPlan: { months: number; total: number; }; }
```

### ProcessingOrdersInfo

```ts
{ filename: "orders.csv"; row_count: number; gross_sales_cents: number; currency: "USD"; }
```

### DocumentTemplate

```ts
{ id: TemplateId; type: DocumentType; name: string; description: string; version: number; isDefault: boolean; }
```

### ExpenseCsvError

```ts
{ row: number; column: "Name" | "Label" | "Type" | "Category" | "Max per transaction ($)" | "Min per transaction ($)" | "Weight" | "Frequency" | "Frequency min" | "Frequency max" | "Frequency unit" | "Billing day" | "Mandatory" | "Direction" | "Icon" | "Color" | "PostingDays" | "CSV"; message: string; }
```

### ShopifyOrderGenerationConfig

```ts
({ generation_mode: "automatic"; total_volume: string; aov: string; min_amount: string; max_amount: string; period: { mode: "one_month"; month: string; } | { mode: "multi_month"; from_month: string; to_month: string; } | { mode: "custom"; start_date: string; end_date: string; }; seed?: string | undefined; as_of?: string | undefined; } | { generation_mode: "manual"; monthly_sales: { month: string; gross_amount: string; order_count: number; }[]; period: { mode: "one_month"; month: string; } | { mode: "multi_month"; from_month: string; to_month: string; } | { mode: "custom"; start_date: string; end_date: string; }; seed?: string | undefined; as_of?: string | undefined; } | { volume_mode: "auto"; total_volume: string; volume_basis: "amount"; from_month: string; to_month: string; aov: string; min_amount: string; max_amount: string; seed?: string | undefined; as_of?: string | undefined; } | { volume_mode: "manual"; monthly_volumes: { month: string; gross_amount: string; }[]; volume_basis: "amount"; from_month: string; to_month: string; aov: string; min_amount: string; max_amount: string; seed?: string | undefined; as_of?: string | undefined; } | { volume_mode: "auto"; total_orders: number; volume_basis: "orders"; from_month: string; to_month: string; aov: string; min_amount: string; max_amount: string; seed?: string | undefined; as_of?: string | undefined; } | { volume_mode: "manual"; monthly_orders: { month: string; order_count: number; }[]; volume_basis: "orders"; from_month: string; to_month: string; aov: string; min_amount: string; max_amount: string; seed?: string | undefined; as_of?: string | undefined; }) & { seed: string; as_of: string; }
```

### ShopifyOrderGenerationMonth

```ts
{ month: string; total_rows: number; gross_amount: string; aov: string; }
```

### ShopifyOrderInput

```ts
{ row_number: number; date: string; time: string; first_name: string; last_name: string; amount: string; currency: "USD"; product: string; }
```

### ShopifyConnection

```ts
{ id: string; shop_id: string; shop_domain: string; shop_name: string; currency: string; timezone: string; is_development: boolean; created_at: string; }
```

### ShopifyImport

```ts
{ id: string; connection_id: string; shop_domain: string; filename: string; filenames: string[]; status: ShopifyImportStatus; total_rows: number; imported_rows: number; skipped_rows: number; failed_rows: number; uncertain_rows: number; undo_total_rows: number; undone_rows: number; undo_failed_rows: number; undo_requested_at: string | null; gross_amount: string; currency: string | null; date_from: string | null; date_to: string | null; error: string | null; created_at: string; updated_at: string; }
```

### ShopifyImportMonth

```ts
{ month: string; total_rows: number; gross_amount: string; }
```

### ShopifyImportRow

```ts
ShopifyOrderInput & { status: "pending" | "creating" | "imported" | "skipped" | "failed" | "uncertain" | "undo_pending" | "undoing" | "undone" | "undo_failed"; shopify_order_id: string | null; shopify_order_name: string | null; error: string | null; }
```

### ShopifyImportStatus

```ts
"failed" | "paused" | "cancelled" | "queued" | "undo_failed" | "running" | "preview" | "undone" | "uploading" | "completed" | "undo_pending" | "undoing"
```

### CategoryMatch

```ts
{ category_id: string; category_name: string; category_path: string; included_category_ids: string[]; requested: number; found: number; selected: number; products: ProductMatch[]; }
```

### DomainCheck

```ts
{ domain: string; available: boolean; verified: boolean; price: number | null; currency: string; premium: boolean; premiumRegistrationPrice: number | null; premiumRenewalPrice: number | null; premiumRestorePrice: number | null; premiumTransferPrice: number | null; icannFee: number | null; eapFee: number | null; errorNo: string; description: string; dryRun: boolean; }
```

### ProvisionSource

```ts
"purchased" | "already-assigned" | "existing" | "confirmed"
```

### DomainExecutionResult

```ts
{ status: "pending_purchase" | "purchased" | "dns_pending" | "live"; dryRun: boolean; dnsUpdated: boolean; renderVerification: string; }
```

### ProvisionProgress

```ts
{ store_id: string; store_name: string; status: "queued" | "running" | "done" | "failed"; queued_at: string; finished_at?: string | undefined; retry_at?: string | undefined; result?: ProvisionResult | undefined; error?: string | undefined; }
```

### ContentDiagnostic

```ts
{ code: string; severity: "error" | "warning"; path: string; sectionId?: string; slotId?: string; message: string; }
```

### GeneratedTextSlot

```ts
{ value: unknown; provenance: "generated"; generation: { provider: "openai" | "anthropic"; model: string; contractVersion: number; prompt: string; }; }
```

### CatalogImageSlot

```ts
{ value: CatalogImageFallback; provenance: "fallback"; generation: { provider: "catalog"; contractVersion: 1; }; }
```

### LibraryImageSlot

```ts
{ value: { url: string; alt: string; source: "unsplash"; unsplash_id: string; attribution: { name: string; link: string; }; }; provenance: "generated"; generation: { provider: "unsplash"; contractVersion: 1; }; }
```

### UnsplashImage

```ts
{ id: string; thumb: string; regular: string; alt: string; author: string; authorUrl: string; downloadLocation: string; }
```

### ProductAssetKind

```ts
"packshot" | "lifestyle"
```

### ProductAssetBrandingMode

```ts
"private_label" | "preserve_brand"
```

### ProductAssetState

```ts
"ready" | "failed" | "queued" | "running"
```

### MerchantChecklistCheck

```ts
{ id: string; label: string; status: "pass" | "issue" | "verify"; detail: string; samples?: string[]; }
```

### FlowItem

```ts
{ id: string; batch_id: string; owner_id: string; company_id: string; store_type: StoreType; store_id: string | null; ordinal: number; plan: FlowPlan; stage: FlowStage; status: "queued" | "running" | "waiting" | "failed" | "ready" | "cancelled"; attempts: number; error: string | null; next_attempt_at: string; updated_at?: string; lease_until?: string | null; lease_token?: string | null; domain?: string | null; delivery_mode?: "preview" | "live" | null; quality_progress?: FlowQualityProgress | null; }
```

### FlowWorkerHealth

```ts
{ status: "online" | "offline" | "unknown"; last_seen_at: string | null; active_count: number; last_error?: string | null; }
```

### FlowEvent

```ts
{ id: string; batch_id: string; item_id: string | null; stage: FlowStage | null; level: "info" | "warning" | "error"; event_type: string; message: string; details: Record<string, unknown>; created_at: string; }
```

### FlowPreflight

```ts
{ ready: boolean; checks: { name: string; ready: boolean; message: string; }[]; }
```

### NamecheapReadOnlyDiagnostic

```ts
{ target: "production" | "sandbox"; observed_client_ip: string; account_list_readable: true; availability: Pick<DomainCheck, "domain" | "available" | "verified" | "price" | "currency" | "premium" | "icannFee" | "eapFee">; pricing_readable: true; balance_readable: true; balance_currency: string; }
```

### NamecheapDnsHost

```ts
{ name: string; type: string; address: string; mxPref?: string; ttl?: string; }
```

### RegistryPurchaseResultItem

```ts
{ item_id: string | null; domain_id: string | null; company_id: string; domain: string; status: PurchaseItemRow["status"]; error: string | null; record?: Record<string, unknown> | undefined; }
```

### FlowConfig

```ts
{ company_ids: string[]; counts: { nutra: number; classic: number; marketplace: number; agency: number; }; approved_only: boolean; price_points: number[]; dry_run: boolean; max_domain_price: number; generate_product_images?: boolean | undefined; }
```

### FlowProductSnapshot

```ts
{ product_id: string; category_id: string; price_cents: number; name: string; }
```

### Status

```ts
"active" | "inactive"
```

### StorefrontComponentKey

```ts
"topbar" | "header" | "navigation" | "navigationCart" | "searchBar" | "megaMenu" | "mobileMenu" | "breadcrumbs" | "hero" | "trendingNow" | "bestsellers" | "newArrivals" | "ourPicks" | "productGrid" | "shopByCategory" | "aboutStory" | "faq" | "salesPoints" | "newsletter" | "productCard" | "collectionPage" | "productPage" | "imageGallery" | "buyBox" | "productTabs" | "relatedProducts" | "addToCart" | "paymentBadges" | "supportBadge" | "quantitySelector" | "cartPage" | "cartDrawer" | "checkoutPage" | "contactPage" | "legalPage" | "trackingPage" | "emptyState" | "footer" | "agencyServices" | "agencyProcess" | "agencyCta"
```

### ComponentGroup

```ts
"Global shell" | "Homepage" | "Product discovery" | "Product detail" | "Commerce pages" | "Content pages"
```

### AdvancedProcessingSettings

```ts
{ paymentMix: { brand: "visa" | "mastercard" | "amex" | "discover" | "other"; shareBps: number; }[]; fees: { id: string; name: string; category: "other" | "processing" | "authorization" | "interchange" | "network" | "dispute" | "account"; basis: "gross_sales" | "net_sales" | "sales_and_refunds" | "sales" | "refunds" | "disputes" | "authorizations" | "avs" | "declines" | "batches" | "payouts" | "month"; shareBps: number; percent: string; unitUsd: string; flatCents: number; minimumCents: number; direction: "charge" | "credit"; collection: "withheld" | "invoiced"; prepaidCents: number; months: number[]; brand?: "visa" | "mastercard" | "amex" | "discover" | "other" | undefined; }[]; activity: { authorizationMultiplierBps: number; avsCoverageBps: number; declineRateBps: number; refundAmountBps: number; chargebackAmountBps: number; priorRefunds: { date: string; count: number; amountCents: number; }[]; priorChargebacks: { date: string; count: number; amountCents: number; }[]; recoveries: { date: string; count: number; amountCents: number; }[]; adjustments: { date: string; amountCents: number; description: string; }[]; salesCount?: number | undefined; reversalVersion?: 2 | undefined; aovRangeCents?: { minCents: number; maxCents: number; } | undefined; refundRateRangeBps?: { minBps: number; maxBps: number; } | undefined; chargebackRateRangeBps?: { minBps: number; maxBps: number; } | undefined; saleAmountRange?: { minCents: number; maxCents: number; distributionVersion?: 2 | undefined; } | undefined; }; reserve: { openingCents: number; basis: "gross_sales" | "net_sales"; releases: { date: string; amountCents: number; }[]; capCents?: number | undefined; }; balances: { openingAvailableCents: number; openingPending: { availableOn: string; amountCents: number; }[]; openingHeldCents: number; closingAvailableCents: number; }; holds: { date: string; action: "hold" | "release"; amountCents: number; }[]; settlement: { lagBusinessDays: number; minimumPayoutCents: number; continuousActivity?: boolean | undefined; }; priorYearToDate: { year: number; grossSalesCents: number; salesCount: number; }; }
```

### Loan

```ts
{ label: string; account: string; opening: number; advances: number; interest: number; fees: number; payment: number; principal: number; closing: number; annualRateBps: number; dueDate: string; creditLimit: number | null; }
```

### TemplateId

```ts
`business-bank-statement-${string}` | `business-bank-letter-${string}` | `business-bank-statement-initial-deposit-${string}` | `personal-bank-statement-${string}` | `phone-bill-${string}` | `utility-bill-${string}` | `agreements-${string}` | `processing-statement-${string}` | `gmp-certificate-${string}` | `supplier-invoice-${string}` | `tax-return-${string}` | `tax-return-confirmation-${string}`
```

### DocumentType

```ts
"business-bank-statement" | "business-bank-letter" | "business-bank-statement-initial-deposit" | "personal-bank-statement" | "phone-bill" | "utility-bill" | "agreements" | "processing-statement" | "gmp-certificate" | "supplier-invoice" | "tax-return" | "tax-return-confirmation"
```

### ProductMatch

```ts
{ id: string; category_id: string; name: string; slug: string; price_after: number; images: unknown[]; sort_order: number; selected: boolean; }
```

### ProvisionResult

```ts
{ store_id: string; store_name: string; domain: string | null; source: ProvisionSource; purchase: { status: string; charged_amount: unknown; currency: unknown; max_total: number; } | null; assigned: boolean; support_email: string | null; connection: DomainExecutionResult | { error: string; retryAt?: number | undefined; } | null; }
```

### CatalogImageFallback

```ts
{ [x: string]: unknown; url: string; alt: string; source: "upload" | "unsplash" | "fal" | "catalog"; decorative?: boolean | undefined; productId?: string | undefined; prompt?: string | undefined; subject?: string | undefined; artDirection?: string | undefined; focalPoint?: { x: number; y: number; } | undefined; width?: number | undefined; height?: number | undefined; }
```

### PurchaseItemRow

```ts
{ id: string; batch_id: string; owner_id: string; domain_id: string | null; company_id: string; domain: string; position: number; status: "not_attempted" | "reserved" | "purchasing" | "purchased" | "idempotent" | "failed" | "reconciliation_required"; quoted_price: number | string; icann_fee: number | string; estimated_total: number | string; currency: string; error: string | null; }
```

## Interface call inventory

- apps/admin/src/components/content-document-editor.tsx:78 — GET base — response: Snapshot
- apps/admin/src/components/content-document-editor.tsx:212 — PUT `${base}/draft` — response: { draftId: string; document: ContentDocument }
- apps/admin/src/components/content-document-editor.tsx:233 — POST `${base}/generate` — response: {
      value: unknown;
      provenance: 'generated' | 'fallback';
      generation?: Record<string, unknown>;
    }
- apps/admin/src/components/content-document-editor.tsx:314 — POST `${base}/publish`
- apps/admin/src/components/content-document-editor.tsx:672 — POST '/images/upload' — response: { url: string }
- apps/admin/src/components/content-document-editor.tsx:765 — POST `${base}/rollback`
- apps/admin/src/components/create-documents-dialog.tsx:802 — GET '/templates' — response: { data: DocumentTemplate[] }
- apps/admin/src/components/create-documents-dialog.tsx:859 — POST '/documents' — response: { data: Document[] }
- apps/admin/src/components/document-preview.tsx:57 — GET `/documents/${document.id}/preview`
- apps/admin/src/components/document-preview.tsx:126 — GET `/templates/${templateId}/preview`
- apps/admin/src/components/entity-dialog.tsx:39 — PATCH|POST `/${resource}${editing ? `/${initial!.id}` : ''}`
- apps/admin/src/components/expense-profile-editor.tsx:215 — PATCH|POST `/expense-profiles${profile ? `/${profile.id}` : ''}` — response: ExpenseProfile
- apps/admin/src/components/external-domain-dialog.tsx:49 — GET `/domains/${connectionId}/dns` — response: Connection
- apps/admin/src/components/external-domain-dialog.tsx:61 — POST '/domains/external' — response: Connection
- apps/admin/src/components/external-domain-dialog.tsx:73 — POST '/domains/external/bulk' — response: { results: typeof results }
- apps/admin/src/components/external-domain-dialog.tsx:84 — POST `/domains/${connectionId}/verify` — response: Connection
- apps/admin/src/components/external-domain-dialog.tsx:97 — DELETE `/domains/${connectionId}/external`
- apps/admin/src/components/forms.tsx:312 — GET `/product-categories/tree?scope=${scope}` — response: { data: CategoryOptionRecord[] }
- apps/admin/src/components/forms.tsx:394 — GET `/domains/available-for-store?${params}` — response: ListResponse<StoreDomainRow>
- apps/admin/src/components/forms.tsx:796 — GET '/settings/integrations' — response: Record<
          'namecheap' | 'render' | 'unsplash' | 'anthropic' | 'openai' | 'fal',
          { configured: boolean }
        >
- apps/admin/src/components/forms.tsx:925 — GET `/stores/${String(initial?.id)}/nmi` — response: { configured: boolean; username: string }
- apps/admin/src/components/forms.tsx:949 — GET `/products?page=1&pageSize=20&status=active&sort=name&order=asc&search=${encodeURIComponent(productSearch.trim())}` — response: ListResponse<ManagedStoreProduct>
- apps/admin/src/components/forms.tsx:1013 — POST '/stores/pre-match' — response: ProductMatchPreview
- apps/admin/src/components/forms.tsx:1065 — POST '/images/upload' — response: { url: string }
- apps/admin/src/components/forms.tsx:1108 — POST '/stores/content/generate' — response: { content: Record<string, unknown>; image_updated: boolean }
- apps/admin/src/components/forms.tsx:1140 — POST '/stores/branding/generate' — response: { url: string }
- apps/admin/src/components/forms.tsx:1173 — POST '/stores/media/generate' — response: { image: Record<string, unknown> }
- apps/admin/src/components/forms.tsx:2412 — POST '/images/upload' — response: { url: string }
- apps/admin/src/components/forms.tsx:2422 — GET `/images/search?q=${encodeURIComponent(search)}&page=1`
- apps/admin/src/components/forms.tsx:2430 — POST '/images/select' — response: { url: string }
- apps/admin/src/components/forms.tsx:2452 — POST `/products/${initial.id}/auto-images`
- apps/admin/src/components/global-search.tsx:116 — GET `/search?${new URLSearchParams({ q: debounced, kind, page: String(page) })}` — response: { groups: Group[] }
- apps/admin/src/components/merchant-checklist-panel.tsx:40 — GET `/stores/${storeId}/merchant-checklist` — response: MerchantChecklist
- apps/admin/src/components/payment-gateway-panel.tsx:33 — GET `/stores/${storeId}/payment-gateway` — response: GatewayStatus
- apps/admin/src/components/payment-gateway-panel.tsx:39 — PUT `/stores/${storeId}/payment-gateway` — response: GatewayStatus
- apps/admin/src/components/product-asset-studio.tsx:54 — GET `/stores/${storeId}/product-assets?kind=${kind}&page=${page}&page_size=20` — response: Status
- apps/admin/src/components/product-asset-studio.tsx:69 — POST `/stores/${storeId}/product-assets/enqueue` — response: { accepted: number; created: number }
- apps/admin/src/components/product-asset-studio.tsx:99 — POST `/stores/${storeId}/product-assets/retry`
- apps/admin/src/components/product-asset-studio.tsx:112 — POST `/stores/${storeId}/product-assets/regenerate`
- apps/admin/src/components/product-asset-studio.tsx:124 — POST `/stores/${storeId}/product-assets/reject`
- apps/admin/src/components/profile-editor.tsx:18 — GET `/${resource}/${encodeURIComponent(editId!)}` — response: T
- apps/admin/src/components/profile-fields.tsx:22 — GET `/${resource}?page=${page}&pageSize=100&status=all&sort=${resource === 'companies' ? 'name' : 'first_name'}&order=asc` — response: ListResponse<T>
- apps/admin/src/components/resource-table.tsx:123 — GET `/${resource}?${params}` — response: ListResponse<T>
- apps/admin/src/components/resource-table.tsx:132 — PATCH `/${resource}/${row.id}/status`
- apps/admin/src/components/resource-table.tsx:143 — DELETE `/${resource}/${row.id}`
- apps/admin/src/components/shell.tsx:57 — GET '/config' — response: RuntimeConfig
- apps/admin/src/components/shopify-create-import-dialog.tsx:166 — POST '/shopify-imports/generation/download'
- apps/admin/src/components/shopify-create-import-dialog.tsx:294 — POST '/shopify-imports/generation/preview' — response: ShopifyOrderGenerationPreview
- apps/admin/src/components/store-layout-editor.tsx:32 — GET `/stores/${storeId}/content-document` — response: { document: ContentDocument }
- apps/admin/src/components/store-publication-panel.tsx:25 — GET `/stores/${storeId}/publication` — response: Publication
- apps/admin/src/components/store-publication-panel.tsx:28 — POST `/stores/${storeId}/publication` — response: Publication
- apps/admin/src/components/template-html-editor.tsx:55 — GET `/templates/${template.id}/html?mode=document` — response: EditorSource
- apps/admin/src/components/template-html-editor.tsx:73 — POST `/templates/${template.id}/html/preview` — response: { html: string }
- apps/admin/src/components/template-html-editor.tsx:81 — POST `/templates/${template.id}/html/preview` — response: { html: string }
- apps/admin/src/components/template-html-editor.tsx:97 — PUT `/templates/${template.id}/html` — response: { saved: boolean }
- apps/admin/src/components/template-html-editor.tsx:108 — DELETE `/templates/${template.id}/html` — response: unknown
- apps/admin/src/lib/api.ts:91 — FORWARDED path
- apps/admin/src/lib/auth.tsx:43 — GET '/account' — response: Account
- apps/admin/src/lib/auth.tsx:78 — POST `/admin/users/${id}/sign-in-as` — response: Omit<Impersonation, 'actor_id'>
- apps/admin/src/lib/auth.tsx:90 — DELETE `/account/sign-in-as/${impersonation.id}`
- apps/admin/src/lib/documents.ts:161 — GET `/expense-profiles?page=${page}&pageSize=100` — response: ListResponse<ExpenseProfile>
- apps/admin/src/lib/documents.ts:172 — GET path
- apps/admin/src/lib/documents.ts:196 — GET `/document-generations/${encodeURIComponent(id)}` — response: ListResponse<Document>
- apps/admin/src/lib/documents.ts:224 — GET path
- apps/admin/src/lib/documents.ts:294 — DELETE `/documents/${document.id}`
- apps/admin/src/lib/resource-options.ts:11 — GET `/${resource}?page=${page}&pageSize=100&status=active&sort=name&order=asc&search=` — response: ListResponse<T>
- apps/admin/src/lib/resource-options.ts:21 — GET `/${resource}/${encodeURIComponent(selectedId)}` — response: T
- apps/admin/src/lib/shopify-import.ts:18 — POST `/shopify-imports?connection_id=${encodeURIComponent(connectionId)}` — response: { import: ShopifyImport; duplicate: boolean }
- apps/admin/src/lib/use-flow-activity.ts:38 — GET path — response: FlowActivity
- apps/admin/src/lib/use-flow-activity.ts:40 — GET path
- apps/admin/src/lib/use-flow-activity.ts:88 — GET `/flow/${encodeURIComponent(batchId)}/activity?before=${encodeURIComponent(state.events[0].id)}&limit=200` — response: FlowActivity
- apps/admin/src/lib/use-navigation-counts.ts:26 — GET '/navigation-counts' — response: NavigationCounts
- apps/admin/src/pages/activity-log.tsx:59 — GET `/admin/logs?${params}` — response: { data: LogEntry[]; next: string | null }
- apps/admin/src/pages/api-access.tsx:32 — GET `/api-keys?page=${page}&page_size=25` — response: { data: ApiKey[]; total: number }
- apps/admin/src/pages/api-access.tsx:37 — POST '/api-keys' — response: { data: ApiKey; key: string }
- apps/admin/src/pages/api-access.tsx:52 — DELETE `/api-keys/${id}`
- apps/admin/src/pages/api-access.tsx:60 — PATCH `/api-keys/${key.id}`
- apps/admin/src/pages/api-access.tsx:334 — GET '/public/api-guide' — response: {
        version: string;
        operations: Operation[];
        introduction: string;
        models: Record<string, string>;
      }
- apps/admin/src/pages/api-access.tsx:344 — GET '/public/api-guide.md'
- apps/admin/src/pages/categories.tsx:52 — GET `/product-categories/tree?scope=${scope}` — response: { data: CategoryRecord[] }
- apps/admin/src/pages/css-engine.tsx:118 — GET `/stores/${row.id}/design-reviews/${row.review_id}/files/${encodeURIComponent(name)}` — response: { url: string }
- apps/admin/src/pages/css-engine.tsx:301 — GET '/css-engine' — response: { data: Review[]; control?: { paused: boolean; reason: string | null } }
- apps/admin/src/pages/css-engine.tsx:306 — POST row.status === 'failed'
          ? `/stores/${row.id}/design-reviews/${row.review_id}/retry`
          : `/stores/${row.id}/design-review`
- apps/admin/src/pages/document-workspace.tsx:72 — GET `/documents/${encodeURIComponent(linkedId!)}` — response: Document
- apps/admin/src/pages/document-workspace.tsx:122 — GET `/document-generations/${id}/regeneration-settings` — response: Omit<CreateDocumentsPayload, 'requestKey'>
- apps/admin/src/pages/document-workspace.tsx:138 — POST '/document-controls' — response: { changed: number }
- apps/admin/src/pages/document-workspace.tsx:166 — GET `/document-generations?${params}` — response: ListResponse<DocumentGeneration>
- apps/admin/src/pages/document-workspace.tsx:177 — GET `/document-generations/${generationId}` — response: ListResponse<Document>
- apps/admin/src/pages/document-workspace.tsx:303 — DELETE|POST `/documents/${document.id}${operation === 'delete' ? '' : `/${operation}`}` — response: { requiresCurrentRegeneration?: boolean } | undefined
- apps/admin/src/pages/document-workspace.tsx:327 — GET `/documents/${document.id}/regeneration-settings` — response: Omit<CreateDocumentsPayload, 'requestKey'>
- apps/admin/src/pages/document-workspace.tsx:768 — GET '/templates' — response: { data: DocumentTemplate[] }
- apps/admin/src/pages/domains.tsx:315 — POST '/domains/check' — response: { checks: DomainAvailability[]; dryRun: boolean }
- apps/admin/src/pages/domains.tsx:339 — POST '/domains/purchase' — response: SinglePurchaseResponse
- apps/admin/src/pages/domains.tsx:700 — POST '/domains/check' — response: { checks: DomainAvailability[]; dryRun: boolean }
- apps/admin/src/pages/domains.tsx:739 — POST '/domains/purchase/bulk' — response: BulkPurchaseResponse
- apps/admin/src/pages/domains.tsx:1269 — PATCH `/domains/${domain.id}`
- apps/admin/src/pages/domains.tsx:1342 — GET `/stores?page=${page}&pageSize=100&status=active&sort=name&order=asc&search=` — response: ListResponse<ResourceRecord & { name: string; domain: string | null }>
- apps/admin/src/pages/domains.tsx:1353 — DELETE|PUT `/domains/${domain.id}${remove ? '' : '/assignment'}`
- apps/admin/src/pages/domains.tsx:1464 — POST `/domains/${row.id}/confirm-receipt` — response: DomainRecord
- apps/admin/src/pages/domains.tsx:1491 — GET `/domains?${params}` — response: ListResponse<DomainRecord>
- apps/admin/src/pages/domains.tsx:1501 — GET `/companies?page=${companyPage}&pageSize=100&status=active&sort=name&order=asc&search=` — response: ListResponse<CompanyRecord>
- apps/admin/src/pages/expense-profiles.tsx:31 — GET `/expense-profiles?${new URLSearchParams({ kind, page: String(page), pageSize: '25', search })}` — response: ListResponse<ExpenseProfile>
- apps/admin/src/pages/expense-profiles.tsx:48 — POST|DELETE `/expense-profiles/${profile.id}${operation === 'duplicate' ? '/duplicate' : ''}` — response: ExpenseProfile
- apps/admin/src/pages/flow.tsx:73 — POST '/flow/availability' — response: FlowAvailability
- apps/admin/src/pages/flow.tsx:198 — GET `/flow/preflight?dry_run=${dryRun}&generate_product_images=${productImages}` — response: FlowPreflight
- apps/admin/src/pages/flow.tsx:228 — GET '/flow' — response: { data: FlowBatch[] }
- apps/admin/src/pages/flow.tsx:410 — GET '/flow/companies' — response: { data: { id: string; name: string; country: string }[] }
- apps/admin/src/pages/flow.tsx:433 — POST '/flow' — response: { id: string }
- apps/admin/src/pages/flow.tsx:785 — GET `/flow/${id}` — response: FlowBatch
- apps/admin/src/pages/flow.tsx:801 — POST `/flow/${id}/${name}`
- apps/admin/src/pages/inquiries.tsx:29 — GET `/inquiries${inquiryId ? `?id=${encodeURIComponent(inquiryId)}` : ''}` — response: { data: Inquiry[] }
- apps/admin/src/pages/register.tsx:31 — POST '/public/register'
- apps/admin/src/pages/resources.tsx:85 — PATCH `/${resource}/${row.original.id}/status`
- apps/admin/src/pages/resources.tsx:304 — GET '/stores/domain/provision-status' — response: { stores: ProvisionProgress[] }
- apps/admin/src/pages/resources.tsx:314 — POST '/stores/domain/provision-all' — response: { queued: number }
- apps/admin/src/pages/resources.tsx:335 — POST `/stores/${row.id}/duplicate`
- apps/admin/src/pages/resources.tsx:343 — GET `/stores/${row.id}` — response: StoreRecord
- apps/admin/src/pages/resources.tsx:352 — POST `/stores/${row.id}/domain/connect` — response: DomainConnectionResponse
- apps/admin/src/pages/resources.tsx:383 — POST `/stores/${row.id}/domain/provision` — response: DomainProvisionResponse
- apps/admin/src/pages/settings.tsx:210 — GET '/settings/platform' — response: PlatformResponse
- apps/admin/src/pages/settings.tsx:216 — POST '/settings/platform/render/test' — response: { message: string }
- apps/admin/src/pages/settings.tsx:267 — GET '/settings/integrations' — response: IntegrationResponse
- apps/admin/src/pages/settings.tsx:338 — DELETE `/settings/integrations/${provider}`
- apps/admin/src/pages/settings.tsx:349 — PUT `/settings/integrations/${provider}`
- apps/admin/src/pages/settings.tsx:368 — POST `/settings/integrations/${provider}/test` — response: {
        message: string;
        diagnostic?: {
          observed_client_ip: string;
          account_list_readable: true;
          pricing_readable: true;
          balance_readable: true;
        };
      }
- apps/admin/src/pages/shopify-import.tsx:118 — POST '/shopify-connections/test' — response: ShopifyConnectionTest
- apps/admin/src/pages/shopify-import.tsx:148 — POST '/shopify-connections' — response: ShopifyConnection
- apps/admin/src/pages/shopify-import.tsx:313 — GET '/shopify-connections' — response: { data: ShopifyConnection[] }
- apps/admin/src/pages/shopify-import.tsx:318 — GET `/shopify-imports?page=${page}&pageSize=25` — response: ListResponse<ShopifyImport>
- apps/admin/src/pages/shopify-import.tsx:322 — DELETE `/shopify-connections/${id}`
- apps/admin/src/pages/shopify-import.tsx:868 — GET shopifyImportDetailPath(id, page, status, month) — response: ImportDetail
- apps/admin/src/pages/shopify-import.tsx:874 — POST `/shopify-imports/${id}/${operation}` — response: ShopifyImport
- apps/admin/src/pages/users.tsx:32 — GET `/admin/users?${new URLSearchParams({ search, page: String(page) })}` — response: ListResponse<User>
- apps/admin/src/pages/users.tsx:40 — PATCH `/admin/users/${user.id}/role`