map a product to a workflow.md
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.
Map a product to a workflow
Sets the workflow a product uses: the storefront Element opens it on that product's page. The workflow must be published.
OpenAPI
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:
/product-maps/{id}:
put:
tags:
- Products
summary: Map a product to a workflow
description: >-
Sets the workflow a product uses: the storefront Element opens it on
that product's page. The workflow must be published.
operationId: setProductMap
parameters:
- name: id
in: path
required: true
schema:
type: string
description: >-
The product id, as your store knows it (Shopify: the numeric product
id).
- name: dryRun
in: query
schema:
type: boolean
default: false
description: >-
Validate and check references without saving: the response shows the
record as it would be saved.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProductMap'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
productMap:
allOf:
- $ref: '#/components/schemas/ProductMap'
- $ref: '#/components/schemas/RecordFields'
dryRun:
type: boolean
description: Present and true when nothing was saved.
'400':
description: >-
Invalid request: `code` says why, `param` names the field, `details`
lists every problem
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'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:
ProductMap:
title: Product mapping
description: >-
Which workflow a product in your store uses. The storefront Element
loads the mapped workflow on that product's page, and the workflow's
intake rule decides which files the customer can upload. A product can
use one workflow for every variant, or a different workflow per variant
(for example one per size); a variant without its own workflow uses the
product's. The id in the path is the product id as your store knows it
(Shopify: the numeric product id). On WooCommerce, PrestaShop and
OpenCart the product's workflow is set in the FileCheck plugin's product
settings instead.
type: object
additionalProperties: false
properties:
workflowId:
type:
- string
- 'null'
minLength: 1
description: >-
The published workflow every variant uses unless it has its own.
null when only variants are mapped.
title:
type: string
maxLength: 300
description: The product title, shown in the dashboard's product list.
url:
type:
- string
- 'null'
format: uri
maxLength: 2048
description: >-
The product's storefront page, so the dashboard can link to where
the upload form now appears.
variants:
type: object
maxProperties: 250
description: >-
Per-variant workflows, keyed by the variant id as your store knows
it (Shopify: the numeric variant id). Sending this replaces the
whole set; leave it out to keep the stored one.
propertyNames:
pattern: ^[A-Za-z0-9_.:-]{1,64}$
additionalProperties:
type: object
additionalProperties: false
required:
- workflowId
properties:
workflowId:
type:
- string
- 'null'
minLength: 1
description: >-
The published workflow this variant uses; null to fall back to
the product's.
title:
type: string
maxLength: 300
description: >-
The variant title (for example "A5 / Matte"), shown in the
dashboard.
anyOf:
- required:
- workflowId
properties:
workflowId:
type: string
- required:
- variants
properties:
variants:
minProperties: 1
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, a developer documentation platform.