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

# Capture an order

> Records a commerce order and links its line items (and their Filecheck `jobId`s) to the caller. Currently shaped for WooCommerce (`source: "wp"`).



## OpenAPI

````yaml /openapi.json post /orders/{id}
openapi: 3.1.0
info:
  title: Filecheck API
  version: 1.0.0
  description: >-
    The Filecheck REST API. Submit files as jobs, fetch results, and read your
    workflows, rules, connectors, profiles, and optimize presets. 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.
  - name: Uploads
    description: Mint presigned credentials to upload large files directly.
  - name: Orders
    description: Attach jobs to commerce orders.
  - name: Workflows
  - name: Connectors
  - name: Rules
  - name: Profiles
  - name: OptimizePresets
paths:
  /orders/{id}:
    post:
      tags:
        - Orders
      summary: Capture an order
      description: >-
        Records a commerce order and links its line items (and their Filecheck
        `jobId`s) to the caller. Currently shaped for WooCommerce (`source:
        "wp"`).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
      responses:
        '200':
          description: Order captured
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - wp
          default: wp
        orderId:
          type: string
        status:
          type: string
        currency:
          type: string
        total: {}
        customer:
          type: object
          properties:
            id: {}
            email:
              type: string
        items:
          type: array
          items:
            type: object
            properties:
              jobId:
                type: string
              itemId: {}
              productId: {}
              name:
                type: string
              quantity: {}
              sku:
                type: string
              total: {}
    Error:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
  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.

````