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

# Upload Process Data

> This endpoint is responsible for uploading process data to the server. It accepts multipart form data as input, which includes a JSON payload named 'serial\_payload' and optionally images and files. The 'serial\_payload' consists of information about the identifier, station ID, links, parameters, images, files, and the pass/fail status of the process. Images and files are attached to the payload with their respective file names and binary data. The server's response is a 'requests.Response' object.



## OpenAPI

````yaml POST /process-data
openapi: 3.1.0
info:
  title: Serial
  version: '1.0'
  description: Access and control your Serial data programmatically.
  contact:
    name: Devon Copeland
    email: support@serial.io
    url: www.serial.io
  summary: Serial API
servers:
  - url: https://api.serial.io
security:
  - serial-default-security: []
tags:
  - name: AI
    description: AI Endpoints
  - name: Auth
    description: Auth Endpoints
  - name: Companies
    description: Company Endpoints
  - name: Component Instances
    description: Component Instance Endpoints
  - name: Components
    description: Component Endpoints
  - name: Datasets
    description: Dataset Endpoints
  - name: Fields
    description: Field Endpoints
  - name: Legacy
    description: Legacy Endpoints
  - name: Part Numbers
    description: Part Number Endpoints
  - name: Processes
    description: Process Endpoints
  - name: Properties
    description: Property Endpoints
  - name: Storage
    description: Storage Endpoints
  - name: Users
    description: User Endpoints
  - name: Work Orders
    description: Work Order Endpoints
paths:
  /process-data:
    post:
      tags:
        - Legacy
      summary: Upload Process Data
      description: >-
        This endpoint is responsible for uploading process data to the server.
        It accepts multipart form data as input, which includes a JSON payload
        named 'serial\_payload' and optionally images and files. The
        'serial\_payload' consists of information about the identifier, station
        ID, links, parameters, images, files, and the pass/fail status of the
        process. Images and files are attached to the payload with their
        respective file names and binary data. The server's response is a
        'requests.Response' object.
      operationId: post-process-data
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  identifier: PARENT-SERIAL-NUMBER-123
                  station_id: 65bf308d-c669-4504-b071-b9b296dc7030
                  is_pass: true
                  break_prior_links: false
                  links:
                    identifier: CHILD-SERIAL-NUMBER-123
                  parameters:
                    key_name: Battery Voltage
                    data_type: NUMBER
                    value: 12.3
                    usl: 13.4
                    lsl: 9.8
                    unit: V
                  images:
                    key_name: IV Curve Image
                    file_name: IVCurve123.png
                  files:
                    key_name: IV Curve Raw
                    file_name: IVCurve.csv
              properties:
                identifier:
                  type: string
                  description: A serial number or lot code
                process_id:
                  type: string
                  x-stoplight:
                    id: kp2ktvv60vhri
                  description: A process ID generated through the Serial app
                station_id:
                  type: string
                  description: A station ID generated through the Serial app
                is_pass:
                  type: boolean
                  description: >-
                    Optional override to specify whether the process passed or
                    failed
                break_prior_links:
                  type: boolean
                  description: >-
                    Option to remove prior children that were linked to the
                    parent via this process
                links:
                  type: object
                  description: Array of linked serial numbers or lot codes
                  properties:
                    identifier:
                      type: string
                      description: The child serial number or lot code
                operator_pin:
                  type: string
                  x-stoplight:
                    id: 2e3zxd00x8h3e
                  description: Coming soon...
                parameters:
                  type: object
                  description: Array of parametric data to be uploaded
                  properties:
                    key_name:
                      type: string
                      description: >-
                        The parametric key name, make sure to keep this
                        consistent so data is properly grouped together across
                        multile serial numbers or lot codes
                    data_type:
                      type: string
                      enum:
                        - NUMBER
                        - INTEGER
                        - STRING
                      description: The data type of the parameter
                    value:
                      description: The value of the parametric data
                      type:
                        - number
                        - string
                    usl:
                      type: number
                      description: >-
                        The upper spec limit. Values higher than this will cause
                        the process to fail
                    lsl:
                      type: number
                      description: >-
                        The lower spec limit. Values lower than this will cause
                        the process to fail
                    unit:
                      type: string
                      description: The unit of measure
                  required:
                    - key_name
                    - data_type
                    - value
                images:
                  type: object
                  description: >-
                    Array or images that will be uploaded in conjuction with the
                    serial_payload
                  properties:
                    key_name:
                      type: string
                      description: >-
                        The parametric key name, make sure to keep this
                        consistent so data is properly grouped together across
                        multile serial numbers or lot codes
                    file_name:
                      type: string
                      description: Image file names
                files:
                  type: object
                  description: >-
                    Array or files that will be uploaded in conjuction with the
                    serial_payload
                  properties:
                    key_name:
                      type: string
                      description: >-
                        The parametric key name, make sure to keep this
                        consistent so data is properly grouped together across
                        multile serial numbers or lot codes
                    file_name:
                      type: string
                      description: Generic file names
              required:
                - identifier
                - process_id
            examples:
              serial_payload:
                value:
                  identifier: PARENT-SERIAL-NUMBER-123
                  station_id: 65bf308d-c669-4504-b071-b9b296dc7030
                  process_id: db3dscb24-bs4a-489b-9697-dds457dea7b4
                  is_pass: true
                  break_prior_links: false
                  links:
                    identifier: CHILD-SERIAL-NUMBER-123
                  parameters:
                    key_name: Battery Voltage
                    data_type: NUMBER
                    value: 12.3
                    usl: 13.4
                    lsl: 9.8
                    unit: V
                  images:
                    key_name: IV Curve Image
                    file_name: IVCurve123.png
                  files:
                    key_name: IV Curve Raw
                    file_name: IVCurve.csv
        description: >-
          This endpoint accepts multipart form data as input, which includes a
          JSON payload named 'serial\_payload' and optionally images and files.
          Images and files are attached to the payload with their respective
          file names and binary data. The example body shown here is that only
          of the 'serial\_payload'. The file binaries would need to be attached
          sperately.
      responses:
        '200':
          description: Submit succcessful
          content: {}
        '400':
          description: Bad Request
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
components:
  securitySchemes:
    serial-default-security:
      type: http
      scheme: bearer
      description: '**API Key** or **Token** formatted as `Bearer <YOUR_KEY_OR_TOKEN>`'

````