Correct a manual bulk stock movement
The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.
System-linked movements and inbound movements whose cost layer has already been consumed cannot be changed.
bearerAuthAuthorizationBearer <inv_ token>id*stringuuidmovementId*stringuuidX-Organization-ID?stringOrganization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.
uuidapplication/json- body
delta*integerPositive receipts and negative issues. Structured transfers require zero because the global balance does not change.
-2000000000 <= value <= 2000000000quantity?integerRequired and positive for a structured transfer; otherwise it must equal the absolute delta when provided.
0 <= value <= 2000000000type*string"receipt""issue""adjustment""return""waste""transfer"reason?|length <= 240note?stringlength <= 20000location?|length <= 240fromLocationResourceId?|Structured source location for an issue or transfer.
uuidtoLocationResourceId?|Structured destination location for a receipt or transfer.
uuidcontactId?|Active customer or supplier associated with this movement.
uuidoccurredAt?stringdate-timetotalPriceCents?|Signed transaction value; negative values can represent outbound revenue. Inbound prices must be nonnegative.
-2000000000 <= value <= 2000000000priceCurrency?|3 <= length <= 3Movement and current balance updated atomically
application/json- response
resource*movement*curl -X PATCH 'https://inventory.example.com/api/v1/resources/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock/movements/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "delta": -2000000000, "type": "receipt"}'{ "resource": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "quantity": 0 }, "movement": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6", "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d", "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed", "assemblyBuildId": "fce8760b-ec68-46b1-8ce8-e67517308663", "purchaseReceiptId": "5e357173-740c-410a-a418-e608849f94b4", "delta": 0, "quantity": 0, "totalPriceCents": -2000000000, "priceCurrency": "string", "costCents": 0, "costCurrency": "string", "costEstimated": true, "balanceAfter": 0, "fromLocationBalanceAfter": 0, "toLocationBalanceAfter": 0, "type": "string", "reason": "string", "note": "string", "location": "string", "fromLocationResourceId": "7955d755-17bf-453b-b4c8-103f9d6ec7e9", "toLocationResourceId": "378306b8-97fc-46c0-ba39-c215088585bd", "occurredAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "createdBy": "string" }}