> ## Documentation Index
> Fetch the complete documentation index at: https://filecheck.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Revert to the catalog connector

> Drops your copy of a catalog connector (or un-hides one you deleted), so the built-in version applies again.



## OpenAPI

````yaml /openapi.json post /connectors/{id}/revert
openapi: 3.1.0
info:
  title: Filecheck API
  version: 1.1.0
  description: >-
    The Filecheck REST API. Submit files as jobs and fetch results, and set up
    your account: workflows, upload rules, preflight profiles, connectors,
    optimize presets, delivery destinations, product mappings, storefront
    settings and webhooks. All requests are authenticated server-side with your
    secret key (`sk_live_…`).
servers:
  - url: https://api.filecheck.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Jobs
    description: >-
      Submit files for preflight, fixing, optimization, validation and previews,
      and read the results.
  - name: Uploads
    description: Presigned credentials to upload large files directly.
  - name: Orders
    description: Attach jobs to commerce orders.
  - name: Workflows
    description: >-
      What happens to a customer's files for a product: the intake rule that
      checks them on upload, the processing streams, proofing, merging and
      delivery. Products in your store map to a workflow.
  - name: Rules
    description: >-
      Upload rules: which files a product accepts (kinds, MIME types, how many),
      which preflight profile checks each kind, and what happens when a file
      fails. A workflow's intake points at one rule.
  - name: Profiles
    description: >-
      Preflight profiles: the checks run on a file (size, bleed, resolution,
      colour, fonts…) with their thresholds, severities and automatic fixes. PDF
      profiles check PDFs (and vector and office files once converted); raster
      profiles check images.
  - name: Connectors
    description: >-
      Connectors wire a product page to the Element: what the shopper chose
      (size, page count, sides, finishing) adjusts the rule's size checks for
      that upload, and what FileCheck measured in the file (page count, size,
      area) can fill the page's own inputs so the store prices from the real
      file. The cart plugins store the chosen connector per product.
  - name: Optimize presets
    description: >-
      Saved optimize settings (compression, downsampling, colour conversion)
      that optimize steps can use.
  - name: Destinations
    description: >-
      Where finished files are delivered: SFTP and FTP hotfolders, S3 buckets,
      webhooks. Workflows list the destinations they deliver to. Secrets are
      write-only.
  - name: Products
    description: >-
      Which workflow each product in your store uses. The storefront Element
      opens the mapped workflow on the product page.
  - name: Settings
    description: >-
      How the storefront Element appears on your product pages: where it mounts,
      the add-to-cart button it guards, display mode and theme.
  - name: Webhooks
    description: >-
      HTTP callbacks for job, proof, account and billing events, signed with
      X-FileCheck-Signature.
paths:
  /connectors/{id}/revert:
    post:
      tags:
        - Connectors
      summary: Revert to the catalog connector
      description: >-
        Drops your copy of a catalog connector (or un-hides one you deleted), so
        the built-in version applies again.
      operationId: revertConnector
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The catalog connector id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  connector:
                    allOf:
                      - $ref: '#/components/schemas/Connector'
                      - $ref: '#/components/schemas/RecordFields'
                  reverted:
                    type: boolean
                    description: False when there was no copy to drop.
        '401':
          description: Missing or invalid key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Conflict: `code` says why (in_use, draft_reference, not_a_draft,
            not_a_catalog_record, cart_not_supported)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Connector:
      title: Connector
      description: >-
        Wires a store's own product page to the FileCheck upload element (the
        Element embedded on WooCommerce, Shopify, PrestaShop, OpenCart or custom
        product pages), in both directions, with no custom code. Read entries
        take what the shopper chose on the page (banner width and height, a size
        dropdown, number of pages, single or double sided, finishing such as hem
        and eyelets) and use it to override the size-dependent checks of the
        product's rule and preflight profile for that upload: required artwork
        size, page count, file count, bleed and safe margin. Write entries push
        what FileCheck measured in the upload (page count, page width, height or
        area, color or mono page counts) or the rule's default size into the
        page's own inputs (quantity, width, height, area), so the store
        recalculates the price from the actual file. A connector never accepts,
        rejects or prices anything itself; the rule decides acceptance and the
        store stays in charge of price. It runs in the shopper's browser: the
        Element applies a connector passed to it as its `connector` option (this
        record's JSON, as returned by GET /connectors/{id}); handing the Element
        only a connectorId is reserved and not resolved yet. No other FileCheck
        record points at a connector; the cart plugins store the chosen
        connector id per product.
      type: object
      additionalProperties: false
      properties:
        title:
          type: string
          maxLength: 200
          description: >-
            Name shown in the dashboard and in the cart plugins' per-product
            connector picker, e.g. "Banner size sync". The dashboard will not
            save a connector without one.
        description:
          type: string
          maxLength: 1000
          description: >-
            A note for the print shop: which products and which theme this
            connector was built for.
        entries:
          type: array
          maxItems: 50
          items: 4e98ee42-3c33-4b13-9bb1-00f6b76e00b1
          description: >-
            The connector's rules, both directions in one list, told apart by
            `type`: "read" (product page to FileCheck) or "write" (FileCheck to
            product page; an entry without `type` is a write entry). Entries run
            in order; when several read entries set the same value, the later
            one wins.
        bindings:
          type: array
          maxItems: 50
          items: b3aae98f-ab52-4843-aa3b-5b54c4c1da68
          description: >-
            Legacy copy of the write entries, kept for Element versions released
            before `entries` existed; readers use it only when `entries` is
            empty. Omit it in new connectors, or keep it identical to the write
            entries in `entries` (the dashboard writes it that way on every
            save).
        schemaVersion:
          type: integer
          minimum: 1
          description: >-
            Record format version written by the dashboard editor (currently 1).
            Omit it.
        tags:
          type: array
          maxItems: 50
          items:
            type: string
            minLength: 1
            maxLength: 64
          description: Free-form labels for organising the Library. Not used at runtime.
      definitions:
        entry:
          description: >-
            One read or write rule. `type: "read"` selects the read shape;
            anything else (including no `type`) is a write entry.
          if:
            properties:
              type:
                const: read
            required:
              - type
          then:
            $ref: '#/components/schemas/Connector/definitions/readEntry'
          else:
            $ref: '#/components/schemas/Connector/definitions/writeEntry'
        entryId:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            Stable id for this entry, unique within the connector; it shows up
            in the Element's debug report (?fcdebug=1). Optional: one is
            generated when the dashboard opens the connector.
        entryEnabled:
          type: boolean
          default: true
          description: Set false to keep the entry but skip it at runtime.
        customSelector:
          type: string
          maxLength: 512
          description: >-
            CSS selector for the control on the product page, tried before the
            built-in selectors, e.g. #banner-width or
            select[name="attribute_pa_size"]. Leave empty to rely on the
            built-in selectors alone. Only used with querySelector, so the first
            matching element wins; an invalid selector is skipped.
        rounding:
          type: string
          enum:
            - round
            - floor
            - ceil
          default: round
          description: >-
            How the converted value is rounded to `decimals`: round to nearest,
            floor (down) or ceil (up). With decimals null, floor and ceil round
            to whole numbers and round leaves the value as is.
        decimals:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 6
          description: >-
            Decimal places to round the converted value to (0 to 6). null means
            no rounding. Counts are always whole numbers.
        domEvents:
          type: array
          maxItems: 10
          uniqueItems: true
          items:
            type: string
            minLength: 1
            maxLength: 64
            pattern: ^\S+$
        unitName:
          type: string
          enum:
            - mm
            - cm
            - m
            - in
            - ft
            - pt
          description: >-
            Named unit: mm (millimetres), cm, m (metres), in (inches), ft
            (feet), pt (points, 1/72 inch).
        unit:
          description: >-
            A unit: one of the names mm, cm, m, in, ft, pt, or a positive number
            giving millimetres per one unit of the page's value (25.4 for
            inches, 100 for decimetres).
          anyOf:
            - $ref: '#/components/schemas/Connector/definitions/unitName'
            - type: number
              exclusiveMinimum: 0
        pickedUnit:
          type: object
          additionalProperties: false
          required:
            - fromSelector
          description: >-
            Read the unit from a second control on the page, for pages that pair
            a size box with a unit dropdown.
          properties:
            fromSelector:
              type: string
              minLength: 1
              maxLength: 512
              description: CSS selector of the unit control, e.g. select[name="unit"].
            map:
              type: object
              propertyNames:
                minLength: 1
                maxLength: 128
              additionalProperties:
                $ref: '#/components/schemas/Connector/definitions/unit'
              description: >-
                The unit control's option values mapped to units, e.g. { "CM":
                "cm", "feet": "ft", "mm": "mm" }. Matched as-is, then lower- and
                upper-cased. Without a map the control's value itself must be a
                unit name. An unrecognised value falls back to millimetres.
        countRange:
          type: object
          additionalProperties: false
          minProperties: 1
          properties:
            min:
              type: integer
              minimum: 0
              description: Lowest accepted count.
            max:
              type: integer
              minimum: 0
              description: Highest accepted count. Use min = max for an exact count.
        contextFragment:
          type: object
          additionalProperties: false
          minProperties: 1
          description: >-
            What one choice means for the check, in millimetres and plain
            counts. Each key overrides one part of the product's rule or profile
            for this upload (and only parts that are switched on there).
          properties:
            artworkSize:
              type: object
              additionalProperties: false
              minProperties: 1
              description: >-
                Required finished (trim) size; replaces the profile's allowed
                page sizes and the raster print size used for effective DPI.
              properties:
                width_mm:
                  type: number
                  exclusiveMinimum: 0
                  description: Width in mm.
                height_mm:
                  type: number
                  exclusiveMinimum: 0
                  description: Height in mm.
            pageCount:
              $ref: '#/components/schemas/Connector/definitions/countRange'
              description: >-
                Required number of pages, e.g. { "min": 2, "max": 2 } for double
                sided; replaces the profile's page-count check.
            fileCount:
              $ref: '#/components/schemas/Connector/definitions/countRange'
              description: >-
                How many files the shopper must upload; replaces the rule's file
                cardinality.
            bleed:
              type: object
              additionalProperties: false
              required:
                - required_mm
              description: >-
                Required bleed; replaces the profile's bleed and bleed-coverage
                checks.
              properties:
                required_mm:
                  type: number
                  minimum: 0
                  description: Bleed in mm on each edge, e.g. 25 for a hemmed banner.
            safety:
              type: object
              additionalProperties: false
              required:
                - min_mm
              description: >-
                Safe margin that text must stay inside; replaces the profile's
                safety-margin check (the file is analyzed again when this
                changes).
              properties:
                min_mm:
                  type: number
                  minimum: 0
                  description: Margin in mm from the trim edge, e.g. 20 for eyelets.
        readEntry:
          type: object
          additionalProperties: false
          required:
            - type
            - field
          description: >-
            Product page to FileCheck: read one control the shopper sets and
            turn it into a requirement for the upload check. The value is
            re-read whenever the shopper changes the control.
          allOf:
            - if:
                properties:
                  read:
                    const: attr
                required:
                  - read
              then:
                required:
                  - attr
                properties:
                  attr:
                    type: string
                    minLength: 1
            - if:
                properties:
                  field:
                    const: size
                required:
                  - field
              then:
                required:
                  - pattern
                properties:
                  pattern:
                    minLength: 1
            - if:
                properties:
                  field:
                    enum:
                      - sides
                      - finishing
                required:
                  - field
              then:
                required:
                  - map
                properties:
                  map:
                    type: object
                    minProperties: 1
            - if:
                properties:
                  field:
                    enum:
                      - width
                      - height
                required:
                  - field
              then:
                properties:
                  target:
                    enum:
                      - artworkSize
                      - bleed
                      - safety
                      - null
            - if:
                properties:
                  field:
                    const: size
                required:
                  - field
              then:
                properties:
                  target:
                    enum:
                      - artworkSize
                      - null
            - if:
                properties:
                  field:
                    enum:
                      - pages
                      - files
                required:
                  - field
              then:
                properties:
                  target:
                    enum:
                      - pageCount
                      - fileCount
                      - null
          properties:
            id:
              $ref: '#/components/schemas/Connector/definitions/entryId'
            enabled:
              $ref: '#/components/schemas/Connector/definitions/entryEnabled'
              default: true
            type:
              type: string
              const: read
              description: Marks a read entry.
            field:
              type: string
              enum:
                - width
                - height
                - size
                - pages
                - sides
                - files
                - finishing
              description: >-
                What the control means. width / height: one measurement,
                converted to mm (drives artworkSize by default). size: one
                control holding both, e.g. "3000 x 1000 mm"; needs `pattern`
                with width and height groups (drives artworkSize). pages: number
                of pages (drives pageCount). files: number of separate files
                (drives fileCount). sides and finishing: a choice looked up in
                `map` (sides typically sets pageCount, finishing sets bleed and
                safety). Built-in selectors tried after customSelector: width:
                input[name="width"], #width, input[data-dimension="width"],
                input[name="dimension_width"], input[name="banner_width"],
                .product-width input (height likewise); size:
                select[name="size"], #size, input[name="size"],
                [data-option="size"]; pages: input[name="pages"], #pages,
                select[name="pages"], [data-option="pages"]; sides:
                select[name="sides"], input[name="sides"]:checked, #sides,
                [data-option="sides"]; files: input[name="files"],
                select[name="files"], [data-option="files"]; finishing:
                select[name="finishing"], input[name="finishing"]:checked,
                #finishing, [data-option="finishing"].
            customSelector:
              $ref: '#/components/schemas/Connector/definitions/customSelector'
            read:
              type: string
              enum:
                - value
                - text
                - attr
              default: value
              description: >-
                How to get the raw string from the control: value (the input's
                or select's value, falling back to its text), text (the
                element's text content) or attr (the attribute named in `attr`).
            attr:
              type:
                - string
                - 'null'
              maxLength: 128
              description: Attribute to read when read is attr, e.g. data-value.
            pattern:
              type: string
              maxLength: 500
              description: >-
                Optional JavaScript regular expression run on the raw string
                (first 512 characters). Named groups pick the numbers: width and
                height for a size field, e.g.
                (?<width>[\d.]+)\s*[x×]\s*(?<height>[\d.]+); value for counts
                and choices. Without named groups the first two groups are taken
                as width and height. When a pattern is set and does not match,
                the entry yields nothing (the product's own settings apply)
                rather than guessing.
            patternFlags:
              type: string
              pattern: ^[dgimsuyv]*$
              maxLength: 8
              description: Flags for `pattern`, e.g. i for case-insensitive.
            convertFrom:
              description: >-
                Unit of the measurement on the page, converted to mm (width,
                height and size fields only; ignored for counts and choices). A
                unit name (mm, cm, m, in, ft, pt), a number of millimetres per
                page unit (e.g. 25.4), or { fromSelector, map } to read the unit
                from another control. Default mm.
              anyOf:
                - $ref: '#/components/schemas/Connector/definitions/unit'
                - $ref: '#/components/schemas/Connector/definitions/pickedUnit'
            decimals:
              $ref: '#/components/schemas/Connector/definitions/decimals'
            round:
              $ref: '#/components/schemas/Connector/definitions/rounding'
              default: round
            target:
              type:
                - string
                - 'null'
              enum:
                - artworkSize
                - pageCount
                - fileCount
                - bleed
                - safety
                - null
              description: >-
                What the value drives. Default (null) follows the field: width,
                height and size drive artworkSize; pages drives pageCount; files
                drives fileCount. A width or height entry can instead drive
                bleed or safety (the measurement becomes the bleed or safe
                margin in mm); a pages or files entry can drive pageCount or
                fileCount. Choice fields ignore this and use `map`.
            map:
              type:
                - object
                - 'null'
              propertyNames:
                minLength: 1
                maxLength: 256
              additionalProperties:
                $ref: '#/components/schemas/Connector/definitions/contextFragment'
              description: >-
                For sides and finishing: each option value on the page (as read,
                also tried lower-cased) mapped to what it requires, e.g. {
                "single": { "pageCount": { "min": 1, "max": 1 } }, "double": {
                "pageCount": { "min": 2, "max": 2 } } } or { "hem_eyelets": {
                "bleed": { "required_mm": 25 }, "safety": { "min_mm": 20 } } }.
                An option missing from the map yields nothing. Ignored for other
                fields.
            watch:
              $ref: '#/components/schemas/Connector/definitions/domEvents'
              default:
                - input
                - change
              description: >-
                DOM events on the control that mean the shopper changed it.
                Default ["input", "change"].
        writeEntry:
          type: object
          additionalProperties: false
          required:
            - source
          description: >-
            FileCheck to product page: write one measured fact (or the rule's
            default) into a control on the page. Runs after every upload status
            change.
          allOf:
            - if:
                properties:
                  set:
                    const: attr
                required:
                  - set
              then:
                required:
                  - attr
                properties:
                  attr:
                    type: string
                    minLength: 1
            - anyOf:
                - required:
                    - control
                  properties:
                    control:
                      type: string
                - required:
                    - customSelector
                  properties:
                    customSelector:
                      minLength: 1
          properties:
            id:
              $ref: '#/components/schemas/Connector/definitions/entryId'
            enabled:
              $ref: '#/components/schemas/Connector/definitions/entryEnabled'
              default: true
            type:
              type: string
              const: write
              description: >-
                Marks a write entry. Optional: entries without a type are write
                entries.
            source:
              type: string
              enum:
                - pageCount
                - fileCount
                - colorPageCount
                - monoPageCount
                - width
                - height
                - area
                - ruleWidth
                - ruleHeight
                - rulePages
              description: >-
                The value to write. pageCount: total pages across the upload.
                fileCount: number of accepted files. colorPageCount /
                monoPageCount: pages with any color or spot ink / black-only
                pages (nothing is written when ink was not measured). width /
                height: the first file's page width / height in mm. area: the
                first file's page area in mm². ruleWidth / ruleHeight /
                rulePages: the product rule's default artwork width, height (mm)
                and page count, written before anything is uploaded, to seed the
                page with the product's default size.
            control:
              type:
                - string
                - 'null'
              enum:
                - quantity
                - width
                - height
                - area
                - null
              description: >-
                Which kind of control to write into; picks built-in selectors
                tried after customSelector. quantity: input[name="quantity"],
                input.quantity, #quantity, #qty, .qty, input[name="qty"],
                input[data-quantity], .quantity input[type="number"]. width:
                input[name="width"], #width, .product-width,
                input[data-dimension="width"], input[name="dimension_width"]
                (height likewise). area: input[name="area"], #area,
                .product-area, select[name="area"],
                input[data-dimension="area"]. null: use customSelector only.
                Either control or customSelector is required.
            customSelector:
              $ref: '#/components/schemas/Connector/definitions/customSelector'
            set:
              type: string
              enum:
                - value
                - text
                - attr
              default: value
              description: >-
                How to write: value (sets the input's or select's value), text
                (replaces the element's text) or attr (sets the attribute named
                in `attr`).
            attr:
              type:
                - string
                - 'null'
              maxLength: 128
              description: Attribute to set when set is attr, e.g. data-qty.
            emit:
              $ref: '#/components/schemas/Connector/definitions/domEvents'
              default:
                - input
                - change
              description: >-
                DOM events fired on the control after writing, so the store's
                own scripts (price calculators, variant pickers) notice the
                change. Default ["input", "change"].
            convertFrom:
              $ref: '#/components/schemas/Connector/definitions/unit'
              default: mm
              description: >-
                Unit of the source value. Measured facts are always millimetres,
                so leave this at mm (the default). Ignored for counts.
            convertTo:
              $ref: '#/components/schemas/Connector/definitions/unit'
              default: mm
              description: >-
                Unit the page's control expects for width, height and area: a
                unit name (mm, cm, m, in, ft, pt) or millimetres per page unit.
                Area is converted with the square of the factor. Ignored for
                counts.
            decimals:
              $ref: '#/components/schemas/Connector/definitions/decimals'
            round:
              $ref: '#/components/schemas/Connector/definitions/rounding'
              default: round
    RecordFields:
      type: object
      properties:
        id:
          type: string
          description: The record id.
        source:
          type: string
          enum:
            - domain
            - store
          description: '`domain`: yours. `store`: a built-in catalog record.'
        customized:
          type: boolean
          description: >-
            Your own copy of a built-in record, under the same id. Revert drops
            it.
        draft:
          type: boolean
          description: Present and true on an unpublished draft.
        draftExpiresAt:
          type: string
          format: date-time
          description: When an unpublished draft is deleted.
        created:
          type: integer
          description: Unix time (seconds).
        modified:
          type: integer
          description: Unix time (seconds).
    Error:
      type: object
      properties:
        error:
          type: boolean
          const: true
        code:
          type: string
          description: >-
            Machine-readable reason, such as validation_failed,
            invalid_reference, not_found, in_use, draft_reference.
        message:
          type: string
        param:
          type: string
          description: >-
            The field at fault, as a dotted path (intake.ruleId,
            accepts.0.preflight.profileId).
        details:
          type: array
          description: Every problem found, or the records that block a delete.
          items:
            type: object
            additionalProperties: true
        requestId:
          type: string
          description: Quote it to support.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a bearer token, e.g. `Authorization: Bearer
        sk_live_…`. Secret keys are server-side only.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.