Subrents

Update a subrent

Changes the terms of a subrent: status (pending, active, completed or cancelled), dates, notes, whether the need is resolved and its link to a purchase order (send only the fields to change).

Tool
filmo_subrents_update
Access: Write

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_subrents_update",
    "arguments": {
      "subrentId": "subr_8f2a1c"
    }
  }
}

generated from the schema

linkQuantity deserves attention: if it is LOWER than the quantity of the subrent, the record is SPLIT —the original keeps that quantity and another one is born with the rest—, and what is returned is the original. What is paid to the supplier is NOT part of the public contract, neither to read nor to write. It requires subrents in the plan of the account —included in the current offer, and with the purchases add-on in older plans— (402 without it). Returns the full subrent, the same projection as its GET.

Arguments

subrentIdstringRequired

Subrent identifier.

Limits: min length 1

statusstring

New subrent status.

Available options: pending, active, completed, cancelled

startDatestring<date-time> | null

Start of the subrent (ISO 8601 with offset); null clears it.

endDatestring<date-time> | null

End of the subrent (ISO 8601 with offset); null clears it.

needResolvedboolean

true when the material need that motivated the subrent is already covered.

purchaseOrderIdstring | null

Purchase order the subrent is linked to; null unlinks it.

Limits: min length 1

linkQuantityinteger

Quantity linked to the purchase order. If it is lower than the subrent quantity, the record is split: the original keeps this quantity and a new one is created with the rest.

Limits: > 0

notesstring | null

Subrent notes; null clears them.

idempotencyKeystring

Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.

Limits: min length 1, max length 255

ifMatchstring

Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.

Limits: min length 1

Result

On success the result carries structuredContent with data and meta. These are the attributes of data.

Show the attributes of data
idstring

Unique subrent identifier.

typestring

bulk if it is a quantity of a bulk item, serialized if it is a specific unit.

Available options: bulk, serialized

statusstring

Subrent status.

Available options: pending, active, completed, cancelled

itemIdstring

Identifier of the subrented item.

itemNamestring

Name of the subrented item.

itemSkustring | null

Item SKU; null if it has none.

quantitynumber | null

Subrented units; null if it is a specific unit.

serializedItemIdstring | null

Identifier of the specific unit; null if bulk.

serializedItemCodestring | null

Code of the specific unit; null if bulk.

providerIdstring | null

Identifier of the supplier that lends the material; null if not decided yet.

providerNamestring | null

Supplier name; null if not decided yet.

needResolvedboolean

true if the need is already covered, that is, if the supplier and material are confirmed.

startDatestring<date-time> | null

Start of the required period in ISO 8601 UTC; null if not set.

endDatestring<date-time> | null

End of the required period in ISO 8601 UTC; null if not set.

pickupDatestring<date-time> | null

Pickup date from the supplier in ISO 8601 UTC; null if not set.

returnDatestring<date-time> | null

Return date to the supplier in ISO 8601 UTC; null if not set.

orderIdstring | null

Order that motivates the subrent; null if it has none.

projectIdstring | null

Associated project; null if it has none.

purchaseOrderIdstring | null

Purchase order that formalizes it; null if none has been issued.

spaceIdstring | null

Warehouse where the material is received; null if not applicable.

notesstring | null

Subrent notes; null if it has none.

createdAtstring<date-time>

Creation date in ISO 8601 UTC.

updatedAtstring<date-time>

Last modification date in ISO 8601 UTC.

An error is a result with isError: true and the problem in content[0].text; there is no structuredContent. See Errors.

The same operation by REST

This tool runs PATCH /api/v1/subrents/{subrentId}.

  • Subrents

    Update a subrent

    Changes the terms of a subrent: status (pending, active, completed or cancelled), dates, notes, whether the need is resolved and its link to a purchase order (send only the fields to change).

  • Guides

    Safe writes

    An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.

  • Guides

    Errors

    A tool error is a result with isError: true and the problem in the first text block. Branch on its code.