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

# Get an order

> Reads one order with its lines. Requires orders:read. Order value and the patient reference are redacted; line cost needs catalog.cost:read. 404 when absent or in another workspace.



## OpenAPI

````yaml /openapi.en.json get /v1/orders/{orderId}
openapi: 3.1.0
info:
  description: >-
    The Muveya public developer API: opaque-API-key-authenticated,
    tenant-scoped, read-only /v1 resources. One rate-limit budget per key.
  title: Muveya Developer API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.muveya.com
security: []
tags:
  - name: API key
  - name: Clinics
  - name: Warehouses
  - name: Catalog
  - name: Inventory
  - name: Orders
  - name: Fulfillments
  - name: Analytics
paths:
  /v1/orders/{orderId}:
    get:
      tags:
        - Orders
      summary: Get an order
      description: >-
        Reads one order with its lines. Requires orders:read. Order value and
        the patient reference are redacted; line cost needs catalog.cost:read.
        404 when absent or in another workspace.
      operationId: getOrder
      parameters:
        - name: orderId
          in: path
          required: true
          description: The opaque order id.
          schema:
            type: string
      responses:
        '200':
          description: The requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          headers:
            X-RateLimit-Limit:
              description: The per-key request budget for the current window.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Remaining:
              description: Requests left in the current window (0 when exhausted).
              schema:
                type: integer
                minimum: 0
            X-RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
                minimum: 1
            RateLimit:
              description: >-
                IETF draft budget snapshot, e.g. "limit=120, remaining=119,
                reset=60".
              schema:
                type: string
            RateLimit-Policy:
              description: IETF draft policy, e.g. "120;w=60" (limit;window-seconds).
              schema:
                type: string
        '401':
          description: >-
            The API key is missing, invalid, revoked, expired, or bound to a
            suspended workspace.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: The API key lacks the scope this route requires.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: The resource does not exist in this workspace.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: The API key exceeded its rate limit for the current window.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          headers:
            Retry-After:
              description: Positive delta-seconds until another request is allowed.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Limit:
              description: The per-key request budget for the current window.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Remaining:
              description: Requests left in the current window (0 when exhausted).
              schema:
                type: integer
                minimum: 0
            X-RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
                minimum: 1
            RateLimit:
              description: >-
                IETF draft budget snapshot, e.g. "limit=120, remaining=119,
                reset=60".
              schema:
                type: string
            RateLimit-Policy:
              description: IETF draft policy, e.g. "120;w=60" (limit;window-seconds).
              schema:
                type: string
      security:
        - apiKeyBearer: []
components:
  schemas:
    Order:
      type: object
      additionalProperties: false
      required:
        - orderId
        - number
        - type
        - status
        - requesterId
        - clinicId
        - destinationWarehouseId
        - lines
        - version
      properties:
        orderId:
          type: string
        number:
          type: integer
        type:
          type: string
          enum:
            - general
            - clinical
        status:
          type: string
          enum:
            - draft
            - submitted
            - pending_approval
            - approved
            - rejected
            - cancelled
            - allocated
            - picking
            - dispatched
            - delivered
            - exception
            - received
            - partially_fulfilled
            - closed
        requesterId:
          type: string
        clinicId:
          type: string
        destinationWarehouseId:
          type: string
        preferredSourceWarehouseId:
          type: string
        justification:
          type: string
        patientRef:
          type: string
          description: >-
            Redacted (absent) unless the key holds orders.patient_ref:read
            (never on /v1).
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
        value:
          type: integer
          description: >-
            Order total in minor units. Present only with orders.value:read
            (never on /v1).
        currency:
          type: string
        approvalPlan:
          $ref: '#/components/schemas/OrderApprovalPlan'
        version:
          type: integer
    ProblemDetails:
      type: object
      additionalProperties: false
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - requestId
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          minimum: 400
          maximum: 599
        detail:
          type: string
        instance:
          type: string
        code:
          type: string
        requestId:
          type: string
    OrderLine:
      type: object
      additionalProperties: false
      required:
        - lineId
        - catalogItemId
        - sku
        - name
        - requestedQty
        - unitOfMeasure
        - category
        - highValue
      properties:
        lineId:
          type: string
        catalogItemId:
          type: string
        sku:
          type: string
        name:
          type: string
        requestedQty:
          type: integer
        unitOfMeasure:
          type: string
        category:
          type: string
        highValue:
          type: boolean
        unitCost:
          type: integer
          description: Present only with the catalog.cost:read scope.
        currency:
          type: string
    OrderApprovalPlan:
      type: object
      additionalProperties: false
      required:
        - policyVersion
        - requiresApproval
        - steps
      properties:
        policyVersion:
          type: integer
        requiresApproval:
          type: boolean
        steps:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - stage
              - requiredScope
              - minApprovers
            properties:
              stage:
                type: string
              requiredScope:
                type: string
              minApprovers:
                type: integer
        evaluatedValue:
          type: integer
          description: Present only with the orders.value:read scope.
        currency:
          type: string
  securitySchemes:
    apiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Opaque mvy_test_ API key sent as a Bearer token. It derives exactly one
        workspace server-side; the path never carries a workspace selector.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.