latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Stock

Create a stock item

Creates a new stock item entity (required scope stock:write)

post/v1/stockItems

Headers

Customer-Idinteger required

The customer identifier

Request body

stockDetailsIdinteger required

The unique identifier of the stock details related to this stock item

quantitynumber double nullable

The quantity of the stock items. Must be omitted or null if the stock item is not consumable

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

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

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

soldAtstring date-time nullable

The date when the stock item was sold

notesstring nullable

Notes on the stock item, must be null or omitted if the stock item is not consumable

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

altSerialNumberstring nullable

The alternative serial number of the stock item. Must be omitted or null if the stock item is consumable

supplierSerialNumberstring nullable

The unique number used by the supplier for the stock item, must be null or omitted if the stock item is not consumable

customerSerialNumberstring nullable

The number assigned by the customer for the stock item

isEquipmentboolean

Indicates whether the stock item is equipment or not, defaults to false

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, must be null or omitted when stock item is consumable

Example request

{
  "stockDetailsId": 5514123,
  "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": 0.7,
  "customFields": [
    {
      "definitionId": 5514123,
      "value": "High net worth"
    }
  ]
}

Response

Created

idinteger

Identifier of the newly created record