latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Stock

Update a stock item

Updates the details of a single stock item (required scope stock:write)

patch/v1/stockItems/{stockItemId}

Path parameters

stockItemIdinteger required

Headers

Customer-Idinteger required

The customer identifier

Request body

quantitynumber double nullable

The quantity of the stock items. Must be omitted or null if the stock item is not consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

locationContactIdinteger nullable

The ID of the contact associated with the stock item, must be omitted or null if the stock item is located at a vehicle or another stock item<br/><br/>Optional: Omit to retain current value or provide null to unset

locationVehicleIdinteger nullable

The ID of the vehicle associated with the stock item, must be omitted or null if the stock item is located at a contact or another stock item<br/><br/>Optional: Omit to retain current value or provide null to unset

locationStockItemIdinteger nullable

The ID of the stock item this stock item is allocated to, must be omitted or null if the stock item is located at a contact or a vehicle<br/><br/>Optional: Omit to retain current value or provide null to unset

soldAtstring date-time nullable

The date when the stock item was sold<br/><br/>Optional: Omit to retain current value or provide null to unset

notesstring nullable

Notes on the stock item, must be null or omitted if the stock item is consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

serialNumberstring nullable

The unique number or barcode assigned to each individual stock item for identification and tracking. Required if the stock item is non consumable, otherwise must be null or omitted. Cannot contain preceding or trailing whitespace<br/><br/>Optional: Omit to retain current value or provide null to unset

altSerialNumberstring nullable

The alternative serial number of the stock item. Must be omitted or null if the stock item is consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

supplierSerialNumberstring nullable

The unique number used by the supplier for the stock item. Must be omitted or null if the stock item is consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

customerSerialNumberstring nullable

The unique number used by the customer for the stock item. Must be omitted or null if the stock item is consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

isEquipmentboolean

Indicates whether the stock item is equipment or not<br/><br/>Optional: Omit to retain current value

condition'new' | 'refurbished' | 'used'

Represents the condition of a stock item<p>Possible values:</p><ul><li><b>new</b>: New stock item</li><li><b>refurbished</b>: Refurbished stock item</li><li><b>used</b>: Used stock item</li></ul>

usagenumber double nullable

The usage of the stock item. For items which are chargeable on an hourly, daily or weekly rate. Must be null or omitted if the stock item is consumable<br/><br/>Optional: Omit to retain current value or provide null to unset

Example request

{
  "quantity": 5.3,
  "locationContactId": 5514123,
  "locationVehicleId": 5514123,
  "locationStockItemId": 5514123,
  "soldAt": "2024-08-29T12:30:45.0000000+00:00",
  "notes": "Should be kept in warehouse",
  "serialNumber": "AT-25805",
  "altSerialNumber": "PA-09842",
  "supplierSerialNumber": "TW-015",
  "customerSerialNumber": "LM-214750",
  "isEquipment": true,
  "condition": "new",
  "usage": 6.15,
  "customFields": [
    {
      "definitionId": 5514123,
      "value": "High net worth"
    }
  ]
}

Response

No Content