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

# Simulate Order

> Create or submit order test via the Junction API. Requires authentication with your team API key.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
       --url '{{BASE_URL}}/v3/order/<order_id>/test' \
       --header 'x-vital-api-key: {YOUR_KEY}'
  ```
</RequestExample>


## OpenAPI

````yaml POST /v3/order/{order_id}/test
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v3/order/{order_id}/test:
    post:
      tags:
        - order
      summary: Order Process Simulate
      description: Get available test kits.
      operationId: order_process_simulate_v3_order__order_id__test_post
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
        - name: final_status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/OrderStatus'
              - type: 'null'
            title: Final Status
        - name: delay
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Delay
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SimulationFlags'
                - type: 'null'
              title: Flags
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                title: Response Order Process Simulate V3 Order  Order Id  Test Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OrderStatus:
      type: string
      enum:
        - received.walk_in_test.ordered
        - received.walk_in_test.requisition_created
        - received.walk_in_test.requisition_bypassed
        - completed.walk_in_test.completed
        - sample_with_lab.walk_in_test.partial_results
        - failed.walk_in_test.sample_error
        - cancelled.walk_in_test.cancelled
        - collecting_sample.walk_in_test.appointment_pending
        - collecting_sample.walk_in_test.appointment_scheduled
        - collecting_sample.walk_in_test.appointment_cancelled
        - collecting_sample.walk_in_test.redraw_available
        - received.at_home_phlebotomy.ordered
        - received.at_home_phlebotomy.requisition_created
        - received.at_home_phlebotomy.requisition_bypassed
        - collecting_sample.at_home_phlebotomy.appointment_pending
        - collecting_sample.at_home_phlebotomy.appointment_scheduled
        - collecting_sample.at_home_phlebotomy.draw_completed
        - collecting_sample.at_home_phlebotomy.appointment_cancelled
        - completed.at_home_phlebotomy.completed
        - sample_with_lab.at_home_phlebotomy.partial_results
        - cancelled.at_home_phlebotomy.cancelled
        - failed.at_home_phlebotomy.sample_error
        - received.testkit.ordered
        - received.testkit.awaiting_registration
        - received.testkit.requisition_created
        - received.testkit.requisition_bypassed
        - received.testkit.registered
        - collecting_sample.testkit.transit_customer
        - collecting_sample.testkit.out_for_delivery
        - collecting_sample.testkit.with_customer
        - collecting_sample.testkit.transit_lab
        - sample_with_lab.testkit.delivered_to_lab
        - sample_with_lab.testkit.lab_processing_blocked
        - completed.testkit.completed
        - failed.testkit.failure_to_deliver_to_customer
        - failed.testkit.failure_to_deliver_to_lab
        - failed.testkit.sample_error
        - failed.testkit.lost
        - cancelled.testkit.cancelled
        - cancelled.testkit.do_not_process
        - collecting_sample.testkit.problem_in_transit_customer
        - collecting_sample.testkit.problem_in_transit_lab
        - received.on_site_collection.ordered
        - received.on_site_collection.requisition_created
        - received.on_site_collection.requisition_bypassed
        - sample_with_lab.on_site_collection.draw_completed
        - completed.on_site_collection.completed
        - cancelled.on_site_collection.cancelled
        - sample_with_lab.on_site_collection.partial_results
        - failed.on_site_collection.sample_error
        - completed.walk_in_test.corrected
        - completed.at_home_phlebotomy.corrected
        - completed.on_site_collection.corrected
        - completed.testkit.corrected
      title: OrderStatus
      description: >-
        Used in combination with OrderStatusDetail to represent the current
        order state. 

        OrderStatus is driven by a FSM whereas OrderStatusDetail is descriptive
        only. ℹ️ This enum is non-exhaustive.
    SimulationFlags:
      properties:
        interpretation:
          $ref: '#/components/schemas/Interpretation'
          default: normal
          description: ℹ️ This enum is non-exhaustive.
        result_types:
          anyOf:
            - items:
                $ref: '#/components/schemas/ResultType'
              type: array
            - type: 'null'
          title: Result Types
        has_missing_results:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Missing Results
      type: object
      title: SimulationFlags
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    Interpretation:
      type: string
      enum:
        - normal
        - abnormal
        - critical
        - unknown
      title: Interpretation
      description: ℹ️ This enum is non-exhaustive.
    ResultType:
      type: string
      enum:
        - numeric
        - range
        - comment
        - coded_value
      title: ResultType
      description: ℹ️ This enum is non-exhaustive.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````