Create, complete or delete a stock transfer
distru-mutate-stock-transferWriteCreates, completes or deletes one stock transfer: a move of batch-tracked or product-tracked stock between two of your locations.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| action | enumCREATEUPDATEDELETE | Yes | |
| id | string | No | Required for UPDATE and DELETE: a TRANSIT transfer. Resolve via distru-search-stock-transfers (statuses TRANSIT). |
| fromLocationId | string | No | Required for CREATE. Resolve via distru-search-locations. |
| toLocationId | string | No | Required for CREATE. Must differ from fromLocationId. Resolve via distru-search-locations. |
| items | object[] | No | Required for CREATE. |
| items[]. | string | No | Send exactly one of batchId or productId. A batch of a batch-tracked product. Resolve via distru-search-batches. |
| items[]. | string | No | A product-tracked product. Resolve via distru-search-products. |
| items[]. | string or number | Yes | Greater than 0, in the product's unit type; at most the stock at fromLocationId, read with includeActiveQuantitiesByLocation on distru-get-batch (batchId) or distru-get-product (productId). |
| description | string | No | |
| status | enumCOMPLETEDTRANSIT | No | CREATE: default COMPLETED, the stock arrives at toLocationId now; TRANSIT, it leaves fromLocationId's active stock now, held aside there, and arrives only on UPDATE status COMPLETED. UPDATE: required, COMPLETED. |
| transferDatetime | string | No | The date the transfer shows. Defaults to now; does not change when the stock moves. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| customFields | object[] | No | CREATE only. Only the fields listed are set. Required custom fields must be set. One made required while the transfer is TRANSIT blocks UPDATE, which cannot set it. |
| customFields[]. | string | Yes | Resolve via distru-search-custom-fields (entityType STOCK_TRANSFER). |
| customFields[]. | string or string[] | Yes | TEXT: the text. NUMBER: a plain decimal, such as "12.5". USER: the user's id (usr_…). DROPDOWN: the option name. CHECKBOX: an array of option names. DATE: YYYY-MM-DD, company timezone. "" or [] clears the field. |
Output
This tool returns one of 2 shapes, depending on its inputs.
Presence on a nested field assumes its parent exists.
Result with stockTransfer
| Field | Type | Presence |
|---|---|---|
| stockTransfer | object | Always |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | enumCANCELEDCOMPLETEDTRANSIT | Always |
| stockTransfer. | string | Can be null |
| stockTransfer. | string | Can be null |
| stockTransfer. | string | Can be null |
| stockTransfer. | object[] | Always |
| stockTransfer. | object | Always |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | enumCHECKBOXDATEDROPDOWNNUMBERTEXTUSER | Always |
| stockTransfer. | string | Can be null |
| stockTransfer. | object | Can be null |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | object | Can be null |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | object[] | Always |
| stockTransfer. | string | Can be null |
| stockTransfer. | object | Always |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | object | Can be null |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
| stockTransfer. | object | Can be null |
| stockTransfer. | string | Always |
| stockTransfer. | string | Always |
Result with id
| Field | Type | Presence |
|---|---|---|
| id | string | Always |
What the AI reads
Creates, completes or deletes one stock transfer: a move of batch-tracked or product-tracked stock between two of your locations. Package-tracked products move as whole packages with distru-move-packages. CREATE moves the stock, completed at once (default) or left in transit (status TRANSIT); not idempotent: each CREATE moves the stock again. UPDATE and DELETE act only on a TRANSIT transfer between locations, or between users holding the stock instead of a location (fromLocation or toLocation null), whether made with this tool or in Distru's web app; never a Metrc compliance transfer; refused on any other. UPDATE with status COMPLETED receives it: the stock held aside at fromLocation arrives at toLocation and completedAt is now; this can't be undone. DELETE removes the transfer, which is how Distru cancels one: its stock returns to fromLocation's active stock. Distru inventory only; nothing is sent to Metrc. CREATE and UPDATE return the transfer with its lines as distru-search-stock-transfers does (batch is null on product-tracked lines); DELETE returns its id. Sparse update: status is UPDATE's only field.