Oden Technologies Scrap/Yield Data API

The Scrap/Yield Data API from Oden Technologies — 3 operation(s) for scrap/yield data.

Operations 3

POST /v2/scrap_yield/search Search scrap/yield records #
POST /v2/scrap_yield/set Create or update a scrap/yield record #
POST /v2/scrap_yield/delete Delete a scrap/yield record #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/oden-technologies-scrap-yield-data-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

oden-technologies-scrap-yield-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  title: Oden Scrap/Yield Data API
  contact:
    name: Oden Support
    email: support@oden.io
    url: https://oden.io/contact/
  description: The Oden Private Partner API exposes RESTful API endpoints for clients to get, create and update data on the Oden Platform.
servers:
- url: https://api.oden.app
  description: Oden API server
security:
- APIKeyAuth: []
tags:
- name: Scrap/Yield Data
paths:
  /v2/scrap_yield/search:
    post:
      operationId: search_scrap_yield
      summary: Search scrap/yield records
      tags:
      - Scrap/Yield Data
      description: Searches for scrap/yield records for a given Interval
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - interval
              properties:
                data:
                  $ref: '#/components/schemas/ScrapYieldData'
                interval:
                  $ref: '#/components/schemas/Interval'
            examples:
              Search for scrap yield data by interval:
                summary: Search for scrap yield data by interval.
                value:
                  interval:
                    id: 178b9a1ec20
                    line:
                      name: Line 01
                      factory:
                        name: Factory A
                    type:
                      name: BATCH
                  data:
                    match: ALL
      responses:
        '200':
          description: Successful response
        '409':
          $ref: '#/components/responses/NotUniqueError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalError'
        '501':
          $ref: '#/components/responses/UnimplementedError'
        '400':
          $ref: '#/components/responses/ParameterError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /v2/scrap_yield/set:
    post:
      operationId: set_scrap_yield
      summary: Create or update a scrap/yield record
      tags:
      - Scrap/Yield Data
      description: 'Uploads scrap or yield raw data.


        Notes:


        - If `id` is provided the existing Scrap/Yield record will be updated.


        - If `id` is omitted a new Scrap/Yield record will be created.


        - The scrap yield for an interval is an aggregate of all scrap yield raw data records associated with that interval

        - Therefore, multiple scrap yield records can exist for a single interval, each contributing to the "aggregate" (i.e. sum total) scrap/yield of that interval


        - Changing an aggregate can be done by either adding another record with an offset, or updating an existing record.

        - Example: If you have 3 scrap records in an interval: 50 50 50 = 150 and want to make the aggregate 100 for a given interval, either update one of the existing scrap records from 50 -> 0, or add a new one with value -50


        - Duplicate keys should be avoided, see Schema docs above for details.'
      parameters:
      - $ref: '#/components/parameters/PatternParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              - interval
              properties:
                data:
                  $ref: '#/components/schemas/ScrapYieldData'
                interval:
                  $ref: '#/components/schemas/Interval'
            examples:
              Create new scrap/yield record:
                summary: Create new scrap/yield record.
                value:
                  data:
                    raw_data:
                      scrap: 100
                      yield: 50
                    timestamp: '2022-06-15T08:00:00Z'
                  interval:
                    id: 178b9a1ec20
                    line:
                      name: Line 01
                      factory:
                        name: Factory A
                    type:
                      name: BATCH
              Update existing scrap/yield record:
                summary: Update scrap/yield record.
                value:
                  data:
                    id: a4356a39-212b-4846-aa1d-08f4a5d3c296
                    raw_data:
                      scrap: 100
                      yield: 50
                    timestamp: '2022-06-15T08:00:00Z'
                  interval:
                    id: 178b9a1ec20
                    line:
                      name: Line 01
                      factory:
                        name: Factory A
                    type:
                      name: BATCH
      responses:
        '200':
          description: Successful response
        '409':
          $ref: '#/components/responses/NotUniqueError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalError'
        '501':
          $ref: '#/components/responses/UnimplementedError'
        '400':
          $ref: '#/components/responses/ParameterError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /v2/scrap_yield/delete:
    post:
      operationId: delete_scrap_yield
      summary: Delete a scrap/yield record
      tags:
      - Scrap/Yield Data
      description: Deletes Scrap Yield record by ID and line
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - interval
              properties:
                data:
                  $ref: '#/components/schemas/ScrapYieldData'
                interval:
                  $ref: '#/components/schemas/Interval'
            examples:
              Delete scrap yield record by id and line:
                summary: Delete scrap yield record.
                value:
                  data:
                    id: 16a8fa1f-ba0a-4040-81c9-ac4dd054bdbb
                  interval:
                    line:
                      name: Line 01
                      factory:
                        name: Factory A
      responses:
        '200':
          description: Successful response
        '409':
          $ref: '#/components/responses/NotUniqueError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalError'
        '501':
          $ref: '#/components/responses/UnimplementedError'
        '400':
          $ref: '#/components/responses/ParameterError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    StateReason:
      type: object
      description: An entity representing a state reason. During search, ID will take precedence over name.
      properties:
        id:
          type: integer
        name:
          type: string
    Line:
      type: object
      description: An entity representing a single line of production.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        secondary_name:
          type: string
        factory:
          $ref: '#/components/schemas/Factory'
        match:
          $ref: '#/components/schemas/Match'
    GenericError:
      type: object
      required:
      - error
      - retryable
      properties:
        error:
          type: string
        retryable:
          type: boolean
    Match:
      type: string
      enum:
      - first
      - last
      - unique
      - all
      default: unique
      description: 'Describes which item(s) to match when searching for an entity:

        - `unique` (default): will return an error if the search object matches multiple entities

        - `all`: will return every item that matches search entity

        - `last`: will return the most recent object, where applicable

        - `first`: will return the least recent object, where applicable

        '
    BatchMetadata:
      type: object
      description: Metadata associated with a batch interval
      properties:
        metadata_type:
          type: string
          enum:
          - batch
          readOnly: true
          x-go-type-skip-optional-pointer: true
        run:
          $ref: '#/components/schemas/Interval'
      additionalProperties: true
    Interval:
      type: object
      description: An object representing an interval of time on a line and associated metadata.
      required:
      - type
      - line
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/IntervalType'
        name:
          type: string
        line:
          $ref: '#/components/schemas/Line'
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        metadata:
          description: 'Metadata about this interval, such as the associated run or the state category. Will differ based on the type of interval.

            '
          oneOf:
          - $ref: '#/components/schemas/BatchMetadata'
          - $ref: '#/components/schemas/RunMetadata'
          - $ref: '#/components/schemas/StateMetadata'
          - $ref: '#/components/schemas/CustomMetadata'
          discriminator:
            propertyName: metadata_type
            mapping:
              batch: '#/components/schemas/BatchMetadata'
              run: '#/components/schemas/RunMetadata'
              state: '#/components/schemas/StateMetadata'
              custom: '#/components/schemas/CustomMetadata'
        match:
          $ref: '#/components/schemas/Match'
    RunMetadata:
      type: object
      description: Metadata associated with a run interval
      properties:
        metadata_type:
          type: string
          enum:
          - run
          readOnly: true
          x-go-type-skip-optional-pointer: true
        product:
          $ref: '#/components/schemas/Product'
        target:
          $ref: '#/components/schemas/Target'
      additionalProperties: true
    StateMetadata:
      type: object
      description: Metadata associated with a state interval
      properties:
        metadata_type:
          type: string
          enum:
          - state
          readOnly: true
          x-go-type-skip-optional-pointer: true
        reason:
          $ref: '#/components/schemas/StateReason'
        comment:
          type: string
        category:
          $ref: '#/components/schemas/StateCategory'
      additionalProperties: true
    CustomMetadata:
      type: object
      description: Metadata associated with a custom interval type
      properties:
        metadata_type:
          type: string
          enum:
          - custom
          readOnly: true
          x-go-type-skip-optional-pointer: true
      additionalProperties: true
    IntervalType:
      type: object
      description: An object representing a interval type.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        match:
          $ref: '#/components/schemas/Match'
    Target:
      type: object
      description: An object representing a performance target for a line, product, and metric group.
      properties:
        metric_group:
          $ref: '#/components/schemas/MetricGroup'
        product:
          $ref: '#/components/schemas/Product'
        line:
          $ref: '#/components/schemas/Line'
        target_value:
          type: number
          format: double
        lsl:
          type: number
          format: double
        usl:
          type: number
          format: double
        match:
          $ref: '#/components/schemas/Match'
    MetricGroup:
      type: object
      description: An object representing a metric group; a grouping of like metrics across lines, factories.
      properties:
        name:
          type: string
        description:
          type: string
        id:
          type: string
          format: uuid
        unit_kind_of_quantity:
          type: string
        match:
          $ref: '#/components/schemas/Match'
    Unit:
      type: object
      description: 'A Unit describes a unit of measurement.

        '
      properties:
        id:
          type: integer
        symbol:
          type: string
        name:
          type: string
        kind_of_quantity:
          type: string
    ScrapYieldData:
      type: object
      description: 'An object representing scrap and yield data for a line for a particular run or batch interval. Data can be sent unstructured in the `raw_data` field as long as we have a scrap/yield schema for the factory.

        '
      properties:
        raw_data:
          type: string
          format: json
        id:
          type: string
          format: uuid
        schema:
          $ref: '#/components/schemas/ScrapYieldSchema'
        timestamp:
          type:
          - string
          - 'null'
          format: date-time
        match:
          $ref: '#/components/schemas/Match'
    Factory:
      type: object
      description: An entity representing a factory.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        secondary_name:
          type:
          - string
          - 'null'
        timezone:
          type: string
        match:
          $ref: '#/components/schemas/Match'
    StateCategory:
      type: object
      description: An entity representing a state category. During search, ID will take precedence over name.
      properties:
        id:
          type: integer
        name:
          type: string
    Product:
      type: object
      description: An entity representing a product
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        match:
          $ref: '#/components/schemas/Match'
    ScrapYieldSchema:
      type: object
      description: 'Scrap yield schema represents a factory''s scrap/yield data ingestion configuration.

        '
      properties:
        id:
          type: string
          format: uuid
        factory:
          $ref: '#/components/schemas/Factory'
        scrap_conversion_factor:
          type: number
          format: double
        scrap_unit:
          $ref: '#/components/schemas/Unit'
        yield_conversion_factor:
          type: number
          format: double
        yield_unit:
          $ref: '#/components/schemas/Unit'
  responses:
    InternalError:
      description: 'An internal server error has occurred. If reporting the error to Oden, include the ID returned in this response to aid in debugging.

        '
      content:
        application/json:
          schema:
            type: object
            required:
            - error
            - retryable
            - id
            properties:
              error:
                type: string
              retryable:
                type: boolean
              id:
                type: string
                format: uuid
    NotFoundError:
      description: Entity not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
    ForbiddenError:
      description: 'User has provided valid credentials but is not authorized to access the entity

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
    UnimplementedError:
      description: Endpoint is not yet implemented
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
    ParameterError:
      description: An error occurred regarding one of the input parameters
      content:
        application/json:
          schema:
            type: object
            required:
            - error
            - name
            - retryable
            properties:
              error:
                type: string
              name:
                type: string
              retryable:
                type: boolean
    UnauthorizedError:
      description: User has provided either no credentials or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
    NotUniqueError:
      description: 'A {match: "unique"} was requested, but multiple entities matched the search parameters.

        '
      content:
        application/json:
          schema:
            type: object
            required:
            - entity_name
            - num_matches
            - error
            - retryable
            properties:
              entity_name:
                type: string
              num_matches:
                type: integer
              error:
                type: string
              retryable:
                type: boolean
  parameters:
    PatternParam:
      in: query
      name: pattern
      required: false
      schema:
        type: string
        enum:
        - exact
        - contains
        - regex
        default: exact
      description: 'Optional pattern type to use for matching:

        - `exact` for exact match

        - `contains` for the string to be contained in the query

        - `regex` to match based on a regular expression

        '
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Prefix the value with \"Token\" to indicate the custom authorization type