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

# Change a work order's details

> Correct what a job says about itself — its title, what is known, the machine it is against, whether it needs a permit. On the offline allowlist, so the person who mistyped it at the machine is the one who can put it right there.

The status, the urgency and the dates are refused: each is owned by the action that records why it moved — a transition, Set priority, Reschedule.



## OpenAPI

````yaml /api-reference/integration.json post /rpc/update_work_order
openapi: 3.0.0
info:
  description: >-
    The calls an integration needs first. Every endpoint the application uses is
    in the complete reference.
  title: Asset Infinity integration API
  version: 12.2.3
servers:
  - url: https://app.assetinfinity.ai/api
security: []
tags:
  - description: >-
      Exchange an API key, or an email and password, for a short-lived session
      token, and send it as `Authorization: Bearer <token>` on every other call.
    name: Signing in
  - description: >-
      Where assets are and work happens. A location belongs to a site and may
      sit inside another location.
    name: Sites and locations
  - description: >-
      The asset register: read it, add to it, correct it, move an asset between
      sites and locations, and change its status.
    name: Assets
  - description: >-
      Report a problem. A request is triaged by a person, who turns it into a
      work order or turns it down.
    name: Work requests
  - description: >-
      Raise a job, give it to somebody, move it through the organisation's
      statuses, complete it and close it.
    name: Work orders
  - description: >-
      Send readings in. A meter reading brings the meter forward and raises any
      maintenance the usage has made due. A sensor reading can open or clear an
      alert.
    name: Meters and sensors
  - description: >-
      The part catalogue and what is on the shelf in each store, and the three
      movements an outside system most often records: a delivery in, an issue
      out and a correction.
    name: Parts and stock
  - description: >-
      Have the product call your system when something happens, instead of
      asking it on a timer.
    name: Webhooks
  - description: >-
      The calls behind every register that has no call of its own, answers to
      the organisation's own fields, and the two calls that answer what to send.
      `list_options` returns the ids a field accepts. `describe_call` returns
      the fields any call takes.
    name: Any record
externalDocs:
  description: PostgREST Documentation
  url: https://postgrest.org/en/v12/references/api.html
paths:
  /rpc/update_work_order:
    post:
      tags:
        - Work orders
      summary: Change a work order's details
      description: >-
        Correct what a job says about itself — its title, what is known, the
        machine it is against, whether it needs a permit. On the offline
        allowlist, so the person who mistyped it at the machine is the one who
        can put it right there.


        The status, the urgency and the dates are refused: each is owned by the
        action that records why it moved — a transition, Set priority,
        Reschedule.
      parameters:
        - $ref: '#/components/parameters/preferParams'
      requestBody:
        content:
          application/json:
            schema:
              description: >-
                Correct what a job says about itself — its title, what is known,
                the machine it is against,
                     whether it needs a permit. On the offline allowlist, so the person who mistyped it at the
                     machine is the one who can put it right there.

                     The status, the urgency and the dates are refused: each is owned by the action that records why
                     it moved — a transition, Set priority, Reschedule.
              properties:
                p_values:
                  description: >-
                    The fields to change. Send only those; everything else is
                    left as it is.
                  properties:
                    asset_category_id:
                      description: Asset Category. The id of a row from asset categories.
                      format: uuid
                      type: string
                    asset_id:
                      description: Asset. The id of a row from assets.
                      format: uuid
                      type: string
                    description:
                      description: Description.
                      type: string
                    due_at:
                      description: Due at. When it has to be done by.
                      format: date-time
                      type: string
                    estimated_duration_minutes:
                      description: Estimated Duration (minutes).
                      type: integer
                    location_id:
                      description: Location. The id of a row from locations.
                      format: uuid
                      type: string
                    planned_end_at:
                      description: Planned End at. When it is meant to be finished.
                      format: date-time
                      type: string
                    planned_start_at:
                      description: Planned Start at. When the work is meant to begin.
                      format: date-time
                      type: string
                    remarks:
                      description: Remarks.
                      type: string
                    reported_by_user_id:
                      description: Reported by. The id of a row from users.
                      format: uuid
                      type: string
                    requires_permit:
                      description: >-
                        Needs a permit. Whether this job may not start until a
                        permit has been issued and accepted for it. Set from the
                        plan on a generated job, and by hand on one somebody
                        raised.
                      type: boolean
                    safety_instructions:
                      description: >-
                        Safety Instructions. What the person doing this job has
                        to know before they start. Separate from the description
                        because the description is what the work is, and this is
                        what will hurt you.
                      type: string
                    site_id:
                      description: Site. The id of a row from sites.
                      format: uuid
                      type: string
                    title:
                      description: Title.
                      maxLength: 250
                      type: string
                    work_order_priority_id:
                      description: >-
                        Work Order Priority. How urgent it is. The SLA clocks
                        are computed from this and from the contract, which is
                        why changing it is its own act rather than a field on a
                        form. The id of a row from work order priorities.
                      format: uuid
                      type: string
                    work_order_type_id:
                      description: Work Order Type. The id of a row from work order types.
                      format: uuid
                      type: string
                  type: object
                p_work_order_id:
                  format: uuid
                  type: string
              required:
                - p_work_order_id
                - p_values
              type: object
          application/vnd.pgrst.object+json:
            schema:
              description: >-
                Correct what a job says about itself — its title, what is known,
                the machine it is against,
                     whether it needs a permit. On the offline allowlist, so the person who mistyped it at the
                     machine is the one who can put it right there.

                     The status, the urgency and the dates are refused: each is owned by the action that records why
                     it moved — a transition, Set priority, Reschedule.
              properties:
                p_values:
                  description: >-
                    The fields to change. Send only those; everything else is
                    left as it is.
                  properties:
                    asset_category_id:
                      description: Asset Category. The id of a row from asset categories.
                      format: uuid
                      type: string
                    asset_id:
                      description: Asset. The id of a row from assets.
                      format: uuid
                      type: string
                    description:
                      description: Description.
                      type: string
                    due_at:
                      description: Due at. When it has to be done by.
                      format: date-time
                      type: string
                    estimated_duration_minutes:
                      description: Estimated Duration (minutes).
                      type: integer
                    location_id:
                      description: Location. The id of a row from locations.
                      format: uuid
                      type: string
                    planned_end_at:
                      description: Planned End at. When it is meant to be finished.
                      format: date-time
                      type: string
                    planned_start_at:
                      description: Planned Start at. When the work is meant to begin.
                      format: date-time
                      type: string
                    remarks:
                      description: Remarks.
                      type: string
                    reported_by_user_id:
                      description: Reported by. The id of a row from users.
                      format: uuid
                      type: string
                    requires_permit:
                      description: >-
                        Needs a permit. Whether this job may not start until a
                        permit has been issued and accepted for it. Set from the
                        plan on a generated job, and by hand on one somebody
                        raised.
                      type: boolean
                    safety_instructions:
                      description: >-
                        Safety Instructions. What the person doing this job has
                        to know before they start. Separate from the description
                        because the description is what the work is, and this is
                        what will hurt you.
                      type: string
                    site_id:
                      description: Site. The id of a row from sites.
                      format: uuid
                      type: string
                    title:
                      description: Title.
                      maxLength: 250
                      type: string
                    work_order_priority_id:
                      description: >-
                        Work Order Priority. How urgent it is. The SLA clocks
                        are computed from this and from the contract, which is
                        why changing it is its own act rather than a field on a
                        form. The id of a row from work order priorities.
                      format: uuid
                      type: string
                    work_order_type_id:
                      description: Work Order Type. The id of a row from work order types.
                      format: uuid
                      type: string
                  type: object
                p_work_order_id:
                  format: uuid
                  type: string
              required:
                - p_work_order_id
                - p_values
              type: object
          application/vnd.pgrst.object+json;nulls=stripped:
            schema:
              description: >-
                Correct what a job says about itself — its title, what is known,
                the machine it is against,
                     whether it needs a permit. On the offline allowlist, so the person who mistyped it at the
                     machine is the one who can put it right there.

                     The status, the urgency and the dates are refused: each is owned by the action that records why
                     it moved — a transition, Set priority, Reschedule.
              properties:
                p_values:
                  description: >-
                    The fields to change. Send only those; everything else is
                    left as it is.
                  properties:
                    asset_category_id:
                      description: Asset Category. The id of a row from asset categories.
                      format: uuid
                      type: string
                    asset_id:
                      description: Asset. The id of a row from assets.
                      format: uuid
                      type: string
                    description:
                      description: Description.
                      type: string
                    due_at:
                      description: Due at. When it has to be done by.
                      format: date-time
                      type: string
                    estimated_duration_minutes:
                      description: Estimated Duration (minutes).
                      type: integer
                    location_id:
                      description: Location. The id of a row from locations.
                      format: uuid
                      type: string
                    planned_end_at:
                      description: Planned End at. When it is meant to be finished.
                      format: date-time
                      type: string
                    planned_start_at:
                      description: Planned Start at. When the work is meant to begin.
                      format: date-time
                      type: string
                    remarks:
                      description: Remarks.
                      type: string
                    reported_by_user_id:
                      description: Reported by. The id of a row from users.
                      format: uuid
                      type: string
                    requires_permit:
                      description: >-
                        Needs a permit. Whether this job may not start until a
                        permit has been issued and accepted for it. Set from the
                        plan on a generated job, and by hand on one somebody
                        raised.
                      type: boolean
                    safety_instructions:
                      description: >-
                        Safety Instructions. What the person doing this job has
                        to know before they start. Separate from the description
                        because the description is what the work is, and this is
                        what will hurt you.
                      type: string
                    site_id:
                      description: Site. The id of a row from sites.
                      format: uuid
                      type: string
                    title:
                      description: Title.
                      maxLength: 250
                      type: string
                    work_order_priority_id:
                      description: >-
                        Work Order Priority. How urgent it is. The SLA clocks
                        are computed from this and from the contract, which is
                        why changing it is its own act rather than a field on a
                        form. The id of a row from work order priorities.
                      format: uuid
                      type: string
                    work_order_type_id:
                      description: Work Order Type. The id of a row from work order types.
                      format: uuid
                      type: string
                  type: object
                p_work_order_id:
                  format: uuid
                  type: string
              required:
                - p_work_order_id
                - p_values
              type: object
          text/csv:
            schema:
              description: >-
                Correct what a job says about itself — its title, what is known,
                the machine it is against,
                     whether it needs a permit. On the offline allowlist, so the person who mistyped it at the
                     machine is the one who can put it right there.

                     The status, the urgency and the dates are refused: each is owned by the action that records why
                     it moved — a transition, Set priority, Reschedule.
              properties:
                p_values:
                  description: >-
                    The fields to change. Send only those; everything else is
                    left as it is.
                  properties:
                    asset_category_id:
                      description: Asset Category. The id of a row from asset categories.
                      format: uuid
                      type: string
                    asset_id:
                      description: Asset. The id of a row from assets.
                      format: uuid
                      type: string
                    description:
                      description: Description.
                      type: string
                    due_at:
                      description: Due at. When it has to be done by.
                      format: date-time
                      type: string
                    estimated_duration_minutes:
                      description: Estimated Duration (minutes).
                      type: integer
                    location_id:
                      description: Location. The id of a row from locations.
                      format: uuid
                      type: string
                    planned_end_at:
                      description: Planned End at. When it is meant to be finished.
                      format: date-time
                      type: string
                    planned_start_at:
                      description: Planned Start at. When the work is meant to begin.
                      format: date-time
                      type: string
                    remarks:
                      description: Remarks.
                      type: string
                    reported_by_user_id:
                      description: Reported by. The id of a row from users.
                      format: uuid
                      type: string
                    requires_permit:
                      description: >-
                        Needs a permit. Whether this job may not start until a
                        permit has been issued and accepted for it. Set from the
                        plan on a generated job, and by hand on one somebody
                        raised.
                      type: boolean
                    safety_instructions:
                      description: >-
                        Safety Instructions. What the person doing this job has
                        to know before they start. Separate from the description
                        because the description is what the work is, and this is
                        what will hurt you.
                      type: string
                    site_id:
                      description: Site. The id of a row from sites.
                      format: uuid
                      type: string
                    title:
                      description: Title.
                      maxLength: 250
                      type: string
                    work_order_priority_id:
                      description: >-
                        Work Order Priority. How urgent it is. The SLA clocks
                        are computed from this and from the contract, which is
                        why changing it is its own act rather than a field on a
                        form. The id of a row from work order priorities.
                      format: uuid
                      type: string
                    work_order_type_id:
                      description: Work Order Type. The id of a row from work order types.
                      format: uuid
                      type: string
                  type: object
                p_work_order_id:
                  format: uuid
                  type: string
              required:
                - p_work_order_id
                - p_values
              type: object
        required: true
      responses:
        '200':
          description: OK
components:
  parameters:
    preferParams:
      description: Preference
      in: header
      name: Prefer
      required: false
      schema:
        enum:
          - params=single-object
        type: string

````

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