> ## 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.

# Issue stock

> Hand stock to a person, a project, a department, a cost centre or an asset.

Exactly one recipient: stock that went to one place recorded as having gone to two is a cost counted
twice. The movement carries the store's moving average, so spend by recipient is a sum over the
ledger; no budget is charged.

Stock is either used up or expected back. Left unsaid, the part's own consumable setting decides;
used-up stock is never listed as still out and cannot be returned.



## OpenAPI

````yaml /api-reference/integration.json post /rpc/issue_stock
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/issue_stock:
    post:
      tags:
        - Parts and stock
      summary: Issue stock
      description: >-
        Hand stock to a person, a project, a department, a cost centre or an
        asset.


        Exactly one recipient: stock that went to one place recorded as having
        gone to two is a cost counted

        twice. The movement carries the store's moving average, so spend by
        recipient is a sum over the

        ledger; no budget is charged.


        Stock is either used up or expected back. Left unsaid, the part's own
        consumable setting decides;

        used-up stock is never listed as still out and cannot be returned.
      parameters:
        - $ref: '#/components/parameters/preferParams'
      requestBody:
        content:
          application/json:
            schema:
              description: >-
                Hand stock to a person, a project, a department, a cost centre
                or an asset.


                Exactly one recipient: stock that went to one place recorded as
                having gone to two is a cost counted

                twice. The movement carries the store's moving average, so spend
                by recipient is a sum over the

                ledger; no budget is charged.


                Stock is either used up or expected back. Left unsaid, the
                part's own consumable setting decides;

                used-up stock is never listed as still out and cannot be
                returned.
              properties:
                p_asset_id:
                  format: uuid
                  type: string
                p_client_operation_id:
                  format: uuid
                  type: string
                p_consumed:
                  format: boolean
                  type: boolean
                p_cost_center_id:
                  format: uuid
                  type: string
                p_department_id:
                  format: uuid
                  type: string
                p_device_id:
                  format: uuid
                  type: string
                p_notes:
                  format: text
                  type: string
                p_part_id:
                  format: uuid
                  type: string
                p_project_id:
                  format: uuid
                  type: string
                p_quantity:
                  format: numeric
                  type: number
                p_reason_code:
                  format: text
                  type: string
                p_to_worker_id:
                  format: uuid
                  type: string
                p_warehouse_id:
                  format: uuid
                  type: string
              required:
                - p_part_id
                - p_warehouse_id
                - p_quantity
              type: object
          application/vnd.pgrst.object+json:
            schema:
              description: >-
                Hand stock to a person, a project, a department, a cost centre
                or an asset.


                Exactly one recipient: stock that went to one place recorded as
                having gone to two is a cost counted

                twice. The movement carries the store's moving average, so spend
                by recipient is a sum over the

                ledger; no budget is charged.


                Stock is either used up or expected back. Left unsaid, the
                part's own consumable setting decides;

                used-up stock is never listed as still out and cannot be
                returned.
              properties:
                p_asset_id:
                  format: uuid
                  type: string
                p_client_operation_id:
                  format: uuid
                  type: string
                p_consumed:
                  format: boolean
                  type: boolean
                p_cost_center_id:
                  format: uuid
                  type: string
                p_department_id:
                  format: uuid
                  type: string
                p_device_id:
                  format: uuid
                  type: string
                p_notes:
                  format: text
                  type: string
                p_part_id:
                  format: uuid
                  type: string
                p_project_id:
                  format: uuid
                  type: string
                p_quantity:
                  format: numeric
                  type: number
                p_reason_code:
                  format: text
                  type: string
                p_to_worker_id:
                  format: uuid
                  type: string
                p_warehouse_id:
                  format: uuid
                  type: string
              required:
                - p_part_id
                - p_warehouse_id
                - p_quantity
              type: object
          application/vnd.pgrst.object+json;nulls=stripped:
            schema:
              description: >-
                Hand stock to a person, a project, a department, a cost centre
                or an asset.


                Exactly one recipient: stock that went to one place recorded as
                having gone to two is a cost counted

                twice. The movement carries the store's moving average, so spend
                by recipient is a sum over the

                ledger; no budget is charged.


                Stock is either used up or expected back. Left unsaid, the
                part's own consumable setting decides;

                used-up stock is never listed as still out and cannot be
                returned.
              properties:
                p_asset_id:
                  format: uuid
                  type: string
                p_client_operation_id:
                  format: uuid
                  type: string
                p_consumed:
                  format: boolean
                  type: boolean
                p_cost_center_id:
                  format: uuid
                  type: string
                p_department_id:
                  format: uuid
                  type: string
                p_device_id:
                  format: uuid
                  type: string
                p_notes:
                  format: text
                  type: string
                p_part_id:
                  format: uuid
                  type: string
                p_project_id:
                  format: uuid
                  type: string
                p_quantity:
                  format: numeric
                  type: number
                p_reason_code:
                  format: text
                  type: string
                p_to_worker_id:
                  format: uuid
                  type: string
                p_warehouse_id:
                  format: uuid
                  type: string
              required:
                - p_part_id
                - p_warehouse_id
                - p_quantity
              type: object
          text/csv:
            schema:
              description: >-
                Hand stock to a person, a project, a department, a cost centre
                or an asset.


                Exactly one recipient: stock that went to one place recorded as
                having gone to two is a cost counted

                twice. The movement carries the store's moving average, so spend
                by recipient is a sum over the

                ledger; no budget is charged.


                Stock is either used up or expected back. Left unsaid, the
                part's own consumable setting decides;

                used-up stock is never listed as still out and cannot be
                returned.
              properties:
                p_asset_id:
                  format: uuid
                  type: string
                p_client_operation_id:
                  format: uuid
                  type: string
                p_consumed:
                  format: boolean
                  type: boolean
                p_cost_center_id:
                  format: uuid
                  type: string
                p_department_id:
                  format: uuid
                  type: string
                p_device_id:
                  format: uuid
                  type: string
                p_notes:
                  format: text
                  type: string
                p_part_id:
                  format: uuid
                  type: string
                p_project_id:
                  format: uuid
                  type: string
                p_quantity:
                  format: numeric
                  type: number
                p_reason_code:
                  format: text
                  type: string
                p_to_worker_id:
                  format: uuid
                  type: string
                p_warehouse_id:
                  format: uuid
                  type: string
              required:
                - p_part_id
                - p_warehouse_id
                - p_quantity
              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.