Create a stock item
Creates a new stock item entity (required scope stock:write)
Header Parameters
The customer identifier
Request Body
- new: New stock item
- refurbished: Refurbished stock item
- used: Used stock item
- Array [
- ]
The unique identifier of the stock details related to this stock item
The quantity of the stock items. Must be omitted or null if the stock item is not consumable
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
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
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
The date when the stock item was sold
Notes on the stock item, must be null or omitted if the stock item is not consumable
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
The alternative serial number of the stock item. Must be omitted or null if the stock item is consumable
The unique number used by the supplier for the stock item, must be null or omitted if the stock item is not consumable
The number assigned by the customer for the stock item
Indicates whether the stock item is equipment or not, defaults to false
Possible values: [new
, refurbished
, used
]
Represents the condition of a stock item
Possible values:
The usage of the stock item, must be null or omitted when stock item is consumable
customFields object[] nullable
The custom fields associated with the stock item
The unique identifier of the associated custom field definition
The value of this custom field. If set to null, any existing value will be unset
- 201
- 400
- 403
- 422
- 500
Created
Schema
Identifier of the newly created record
{
"id": 0
}
Bad Request
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Forbidden
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Client Error
Schema
- Array [
- ]
errors object
property name* string[]
string
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"errors": {},
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Server Error
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}