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

# Send a remote control command to a tap

> Waits up to 5 seconds for the tap to accept the command. Accepted means the tap will act on it, not that it already has. The data depends on the action: start takes optional, nullable temperature (°C) and flow (l/min); a missing one is the tap's default_temp or default_flow setting. set_temp takes a required temperature and set_flow a required flow. stop takes none. Setpoints must be within the tap's limits.




## OpenAPI

````yaml /spec.json post /client/taps/{id}/commands
openapi: 3.0.4
info:
  title: Orbital API
  version: 1.0.0
  description: >-
    Send your API key in the `x-api-key` header of every request. The key
    belongs to one Orbital account, and requests act as that account: they see
    and control only the devices it owns or has been given access to. A missing
    or unknown key gets `403` with `{ "message": "Forbidden" }`.
servers:
  - url: https://api.orbital-systems.com
    description: Production
  - url: https://stage-api.orbital-systems.com
    description: Staging
  - url: https://dev-api.orbital-systems.com
    description: Development
security:
  - apiKeyAuth: []
tags: []
paths:
  /client/taps/{id}/commands:
    post:
      tags:
        - Tap commands.
      summary: Send a remote control command to a tap
      description: >
        Waits up to 5 seconds for the tap to accept the command. Accepted means
        the tap will act on it, not that it already has. The data depends on the
        action: start takes optional, nullable temperature (°C) and flow
        (l/min); a missing one is the tap's default_temp or default_flow
        setting. set_temp takes a required temperature and set_flow a required
        flow. stop takes none. Setpoints must be within the tap's limits.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The unique identifier for the tap
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tapCommandRequest'
      responses:
        '200':
          description: The tap accepted the command
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tapCommandResponse'
        '400':
          description: >-
            Unknown action, invalid data or a setpoint outside the device’s
            limits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: temperature must be between 1 and 44
                statusCode: 400
                name: InvalidParameterError
        '403':
          description: You don’t have access to control the device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Forbidden
                statusCode: 403
                name: ForbiddenError
        '404':
          description: Tap not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Tap not found
                statusCode: 404
                name: NotFoundError
        '409':
          description: >-
            The device refused the command in its current state, for example
            while hibernating
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Command not allowed in the current state
                statusCode: 409
                name: ConflictError
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Internal server error
        '503':
          description: The device is offline
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Tap is offline
                statusCode: 503
                name: ServiceUnavailableError
        '504':
          description: The device didn’t answer in time. It may still act on the command.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: Device did not respond
                statusCode: 504
                name: GatewayTimeoutError
components:
  schemas:
    tapCommandRequest:
      oneOf:
        - $ref: '#/components/schemas/tapCommandStart'
        - $ref: '#/components/schemas/tapCommandStop'
        - $ref: '#/components/schemas/tapCommandSetTemp'
        - $ref: '#/components/schemas/tapCommandSetFlow'
      discriminator:
        propertyName: action
        mapping:
          start: '#/components/schemas/tapCommandStart'
          stop: '#/components/schemas/tapCommandStop'
          set_temp: '#/components/schemas/tapCommandSetTemp'
          set_flow: '#/components/schemas/tapCommandSetFlow'
    tapCommandResponse:
      type: object
      properties:
        id:
          type: string
          description: ID of the command. Returned once the device has confirmed it.
          example: 3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b
        action:
          type: string
          description: The action sent.
          example: set_temp
    error:
      type: object
      description: Returned with every 4xx and 5xx response.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong.
        name:
          type: string
          description: Kind of error. Not set on a `500`.
        statusCode:
          type: integer
          description: HTTP status code, repeated from the response. Not set on a `500`.
        code:
          type: integer
          enum:
            - 1
            - 2
          description: >-
            Set on a `403` from pairing a device someone else owns: `1` the
            owner doesn’t accept sharing requests, `2` a sharing request was
            sent to the owner.
    tapCommandStart:
      type: object
      title: start
      properties:
        action:
          type: string
          enum:
            - start
          description: Turns the tap on.
          example: start
        data:
          type: object
          properties:
            temperature:
              type: number
              nullable: true
              description: Temperature setpoint, in °C. Must be within the tap’s limits.
              example: 38
            flow:
              type: number
              nullable: true
              description: Flow setpoint, in L/min. Must be within the tap’s limits.
              example: 4
          description: >-
            Optional setpoints. A missing or `null` value uses the tap’s
            default.
      required:
        - action
    tapCommandStop:
      type: object
      title: stop
      properties:
        action:
          type: string
          enum:
            - stop
          description: Turns the tap off.
          example: stop
        data:
          type: object
          properties: {}
          description: Takes no arguments.
      required:
        - action
    tapCommandSetTemp:
      type: object
      title: set_temp
      properties:
        action:
          type: string
          enum:
            - set_temp
          description: Changes the temperature setpoint while the tap runs.
          example: set_temp
        data:
          type: object
          properties:
            temperature:
              type: number
              description: Temperature setpoint, in °C. Must be within the tap’s limits.
              example: 40
          required:
            - temperature
          description: The new setpoint.
      required:
        - action
        - data
    tapCommandSetFlow:
      type: object
      title: set_flow
      properties:
        action:
          type: string
          enum:
            - set_flow
          description: Changes the flow setpoint while the tap runs.
          example: set_flow
        data:
          type: object
          properties:
            flow:
              type: number
              description: Flow setpoint, in L/min. Must be within the tap’s limits.
              example: 5
          required:
            - flow
          description: The new setpoint.
      required:
        - action
        - data
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Send your API key in the `x-api-key` header of every request. The key
        belongs to one Orbital account, and requests act as that account: they
        see and control only the devices it owns or has been given access to. A
        missing or unknown key gets `403` with `{ "message": "Forbidden" }`.

````

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