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

# Upsert KPI

> Upserts a KPI for an order.



## OpenAPI

````yaml https://console.lomaplatform.com/api/vendor/v1/openapi put /api/vendor/v1/orders/{orderId}/kpis
openapi: 3.1.0
info:
  title: LOMA Vendor API
  version: 1.0.0
  description: >-
    API for managing vendor data on LOMA.

    ### Authentication


    Your API Key should be passed in the `API-Key` header formatted as
    `KEY_ID:KEY_SECRET`.


    Vendors can create API keys in the LOMA console.
  contact:
    email: support@lomaplatform.com
servers:
  - url: https://console.lomaplatform.com
security: []
paths:
  /api/vendor/v1/orders/{orderId}/kpis:
    put:
      tags:
        - Order KPIs
      summary: Upsert KPI
      description: Upserts a KPI for an order.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                kpi_id:
                  type: string
                value:
                  type:
                    - number
                    - 'null'
              required:
                - kpi_id
                - value
      responses:
        '202':
          description: KPI updated.
        '404':
          description: Order or KPI not found.
      security:
        - apiKeyHeader: []
components:
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: API-Key
      description: API Key for the vendor

````